PDA

Click to See Complete Forum and Search --> : Error


bff
May 30th, 2001, 05:16 PM
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

Wynd
May 30th, 2001, 06:36 PM
Can you post your code?

Dillinger4
May 31st, 2001, 06:44 PM
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.

billrogers
Jun 1st, 2001, 08:06 AM
Also if you are attempting to use a swing applet in a browser without the jre installed you will get that error.