Hello Sir,
When i am running this program in my system , it compile fine but on run it gives following errors .I am not able to run this file.While it successfully run in NetBeans i am using in my system.I am not getting what is reason for this.Please help me.In fact i have installed this many times but it worthless.Here i am showing console output below.This is Simple Hello World Example.
I:\>javac Hello.java
I:\>
java Hello
Exception in
thread "main" java.lang.NoClassDefFoundError: Hello
Caused by: java.lang.ClassNotFoundException: Hello
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Hello. Program will exit.