Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

New to Java and Need Help With Running SDK

 
Tammy Lynn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I'm hoping someone can help me. I have installed Java 2 SDK version 1.3.1_02 and have it working to the point of compiling using javac. When I try to run the application (i.e. AnimatorApp)I get an error that says "Exception found in thread 'main' JavaLang.NoClasDefFoundError: AnimatorApp".
I have my actual java and class files in c:\java\, and tried setting the CLASSPATH to this, but it didn't make a difference, so I tried setting it to c:\jdk1.3.1_02\lib\tools.jar, which I saw to do on earlier post, but I continue to get this message. Any other suggestions?
Thank you! Tammy
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when you run it make sure you dont specify the .class at the end.
if your application is HelloWorld.class
then run it like this:
java HelloWorld
hope it works
 
Bhushan Jawle
Ranch Hand
Posts: 249
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tammy,
If you are running your app as "java AnimatorApp" from "c:\java" directory (assuming java.exe is in path) then no need to set CLASSPATH as JVM by default searches current directory.
If you are runnning it from somewhere else try setting CLASSPATH as "c:\java" (no "\" required after java)
This should work.
Regards,
Bhushan
 
Sals Hamid
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are using win2k Right click on my computer and click on advance tab then on environment variable, if u r administrator set path in system variables other wise user variables. write this CLASS PATH: c:\jdk1.3\lib\tools.jar;
IF U are using windows 98 write this code in autoexe batch
click on run and write sysdit
some windows open and then write c:\jdk1.3\lib\tools.jar; in auto exe
 
Sals Hamid
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you are using win2k Right click on my computer and click on advance tab then on environment variable, if u r administrator set path in system variables other wise user variables. write this CLASS PATH: c:\jdk1.3\lib\tools.jar;
PATH c:\jdk1.3\bin;
IF U are using windows 98 write this code in autoexe batch
click on run and write sysdit
some windows open and then write c:\jdk1.3\lib\tools.jar; in auto exe
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic