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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top