Exception in thread "main" java.lang.NoClassDefFoundError:

OS Windows XPpro

J2SE Development Kit 5.0 update 7

I am using TextPad to compile a program for school and I am seeing the following error in the CMD prompt when I select "Run Java Application" from the tools menu. Exception in thread "main" java.lang.NoClassDefFoundError:

The program compiles without errors.

I know this is something to do with the CLASSPATH but have been unable to resolve this error. I changed the environmental variable in my computer>properties>advanced>environmental variables but do not know if it is correct.

scott

[585 byte] By [ssteptoe] at [2007-11-26 8:35:59]
# 1

You are right, the class you're trying to run should be in CLASSPATH environment variable. If you have a . (dot) in the CLASSPATH, you should be able to run a class from current directory. It is usually the best practice for test applications.

If you have your main.class immediately in, say, D:\progs\test your CLASSPATH should be CLASSPATH=D:\progs\test

MaximKartashev at 2007-7-6 22:06:03 > top of Java-index,Development Tools,Solaris and Linux Development Tools...