NoClassDefFoundError exception

M

Matt

Test.java is just a simple class. I have the Java path set in environment,
but it has NoClassDefFoundError exception when i run the program. any ideas?

C:\>javac Test.java

C:\>java Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test

please help. thanks!!
 
S

Sudsy

Matt said:
Test.java is just a simple class. I have the Java path set in environment,
but it has NoClassDefFoundError exception when i run the program. any ideas?

C:\>javac Test.java

C:\>java Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test

please help. thanks!!

java -classpath . Test
 
T

Thomas Weidenfeller

Matt said:
Test.java is just a simple class. I have the Java path set in environment,
but it has NoClassDefFoundError exception when i run the program. any ideas?

C:\>javac Test.java

C:\>java Test
Exception in thread "main" java.lang.NoClassDefFoundError: Test

please help. thanks!!


(a) beginner's questions are best asked in comp.lang.java.help

(b) Consider working through Sun's getting started tutorial
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

(c) Consider reading the tool documentation coming with the JDK

(d) Consider consulting the tool documentation to learn how the VM
searches for classes.

(e) Set the classpath (see the tool documentation on how to do this)

/Thomas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top