Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java install problem

 
thanga_babu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
just installed jdk1.3 in my nt workstation. till then every thing was getting on well. but after the installation, i could not get java.exe to run my java compiled programs. even when i try to run the codes given by sun, i get an error message like this ----> "Exception in thread "main" java.lang.NoClassDefFoundError: (class-file-name)".

one mistake that i committed was, i installed jdk1.3 without uninstalling jdk1.2. pls somebody help me to solve this probs.
thanks a lot,
p.thanga babu
 
Jesse Tilly
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you clarify as to the command-line, er, command you're using to run your program?
Since Java2, the java program can load the base classes without explicity referring to them in the CLASSPATH. It doesn't mean you can ignore referring to other classes. If you're not explicity stating the classpath on the command line, try that. My suggestion? Don't use a CLASSPATH environment variable. Always state the CLASSPATH on the command line. Troubleshooting is real easy that way.
Jesse
 
thanga_babu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi there,
thanks a lot for replying. as you suggested, there were problems in my CLASSPATH env variable. all this because i installed apache-tomcat & gave a new CLASSPATH. the CLASSPATH has to be referring the current dir always like(SET CLASSPATH=.;C:\JAKARTA-TOMACAT\LIB; thats where the mistake was. thanks again.
regards,
p.thanga babu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic