My code is failing with a ClassNotFoundException.
I can see that the jar file containing the class is definitely on the classpath from the command prompt execution.
Is there a way to dump the list of classes on the classpath from the JVM? (Ideally some Java code).
(I don’t want to see the classes in a directory, I want to see a list of what is loaded into the JVM).
That’s actually not what you want to see if you’re getting a
CNFE, since it’s not found. Plus not all available classes will be loaded at any given time.Start by going through this list. But in general, if it’s not found, it’s actually not found.