-
Error
I am very new to Java and I am just writing a simple program and when it runs i get:
Exception in thread "main" java.lang.NoClassDefFoundError: prog
All the program does is take what you wrote after java prog in the command prompt and writes that. But as i said I get that error.
BFF
-
-
The problem stems from Java not being able to find you class.
Either set AUOTEXEC.bat's CLASSPATH environment variable
or use the -classpath switch to inform java where to find your classes. ie...... C:\ java -classpath C:\mydirectory; myprog
Note..... If you do change your autoexec.bat you will have to reboot in order for your changes to take affect.
-
Also if you are attempting to use a swing applet in a browser without the jre installed you will get that error.