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