Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top