hi guys,
i am using
java 1.6.0 version.
The path has been set to my C:\Program Files\Java\jdk1.6.0_31\bin directory.
Problem:
i am getting NoClassDefFoundError for all my java programs which i kept in one of my practice folders
Even though my code is correct still i am below error.
E:\Technical\Practice>java SingletonDemo
Exception in
thread "main" java.lang.NoClassDefFoundError: SingletonD
Caused by: java.lang.ClassNotFoundException: SingletonDemo
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
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)
Could not find the main class: SingletonDemo. Program will exit.
below is my java program
please advice me to get out of this problem.
Thanks
abheeshek