ClassNotFoundException error

Good afternoon, what does the following error mean?

Class not found stancedriver.StanceDriver
java.lang.ClassNotFoundException: stancedriver.StanceDriver
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:688)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:421)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

I'm not trying to do it remotely and the error persists

Author: Tiago S, 2017-06-09

1 answers

Good afternoon Friend,

In this post I explain what this exception means and also the difference between NoClassDefFoundError and ClassNotFoundException. Access there: https://edermfl.wordpress.com/2017/01/12/diferenca-entre-noclassdeffounderror-e-classnotfoundexception/ [] 's


According to Gabriel's guidance, the following explanation follows:

ClassNotFoundException, happens normally when using reflection. If there is a code that loads a class using Class.furnace () or Class.class.getClassLoader().loadClass() and the class does not exist in the classpath, the error is thrown. In this case, the sought class, not it must necessarily have been compiled together with the class that reference.

More detail refer to: https://edermfl.wordpress.com/2017/01/12/diferenca-entre-noclassdeffounderror-e-classnotfoundexception/

 -3
Author: Eder Leite, 2017-06-09 20:38:53