Hello,
I am very new to
Java. I have written MyFirstApp progrm, the below is the code. I compiled it successfully using Command Prompt but when I run it giving the below error. I have opened the class file using notepad just to see how it looks like and when ever I compile the java file the defult class file is saving as notepad file. I am not sure this is the cause of the below error. Please help
Exception in
thread "main" java.lang.NoClassDefFoundError: MyFirstApp
Caused by: java.lang.ClassNotFoundException: MyFirstApp
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: MyFirstApp. Program will exit.