Reputation: 2997
Is there a way to collect java class names(as Strings) on the jvm system path when you know nothing about the context of the classes? I have seen a few similar questions, but all require at least knowing the package names.
I have looked at Java Interface Instrumentation, but unless I'm misreading things, it appears to only relate to programs actively running on the JVM.
Upvotes: 2
Views: 133
Reputation: 117597
You can get the class path jars and directories via:
System.getProperty("java.class.path");
and then you can list all the classes in the jars as this answer shows.
Upvotes: 2