Check if class exists in Java classpath without running its static initializer?

Try the forName(String name, boolean initialize, ClassLoader loader) method of Class and set the param initialize to false.

JavaDoc link

Leave a Comment