Please wait, loading...

 

ERROR : java.lang.NoClassDefFoundError in java ( applet ) or Simple Hello word application

September 21, 2015
Hi , I got a comment from a friend on my youtube video : https://goo.gl/qp9PlF , who is getting a exception error:

Exception in thread “main” java.lang.NoClassDefFoundError

Below is the solution Found Hope this helps :

This Exception in thread “main” java.lang.NoClassDefFoundError: means, that the class which you are trying to run was not found in the classpath.

java Yourclass -cp . 

Into the classpath which tells the JVM to search for classes in actual directory.

If running a class from a .jar file, you have to add this jar file into classpath:

java org.package.Class -cp YourjarWithClass.jar

Hoping this will help you , please quire below if needed ,

Thanks

SOURCE : JUST2CODE.IN Subscribe to our YouTube channel : https://www.youtube.com/user/TheRussell2012

https://i0.wp.com/microsoftdynamics.in/wp-content/uploads/2020/04/Microsoftdynamics365.png?fit=640%2C651
Microsoft Dynamics Community Profile

Learn more