If i use
try { Class.forName("my.package.Foo"); // it exists on the classpath } catch(ClassNotFoundException e) { // it does not exist on the classpath }
the initializer block "Foo" is started. Is there a way to determine if the class "my.package.Foo" is in the classpath without starting its static initializer?
java class classloader
Epaga Aug 12 '10 at 10:06
source share