- #1
tjaeger
- 8
- 0
Exception in thread "main" java.lang.NoClassDefFoundError:
I was getting this error trying to compile some java programs in SSH Secure Shell. Then I made a simple "Hello World" program in my home directory to see if it would compile by typing 'java HelloWorld' but all I got was:
Caused by: java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I looked it up on google and a website said to try compiling by typing
'java -classpath.HelloWorld' but that gave me the error:
Unrecognized option: -classpath.HelloWorld
Could not create the Java virtual machine.
I haven't used Secure Shell in a long time, any help is appreciated.
I was getting this error trying to compile some java programs in SSH Secure Shell. Then I made a simple "Hello World" program in my home directory to see if it would compile by typing 'java HelloWorld' but all I got was:
Caused by: java.lang.ClassNotFoundException: HelloWorld
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
I looked it up on google and a website said to try compiling by typing
'java -classpath.HelloWorld' but that gave me the error:
Unrecognized option: -classpath.HelloWorld
Could not create the Java virtual machine.
I haven't used Secure Shell in a long time, any help is appreciated.