| Author |
Exception at runtime
|
sruthi laya
Greenhorn
Joined: Oct 15, 2008
Posts: 7
|
|
Hi , I am trying to execute a java class , i am getting a run time exception saying "Error in Thread main : NoClassDefFoundException" . I had set my classpath as C:\jdk1.3\bin . I am working on Windows xp . needed a solution , please help me out to sort this . Thanks in advance , sruthi .
|
 |
Thomas Thevis
Ranch Hand
Joined: Sep 02, 2008
Posts: 87
|
|
Hello Sruthi, there were several people with similar problems in the last days. Try to search this forum for these threads first, as for instance Not able to run a class file. If all these threads do not help, come back here and post what you tried so far. Someone will know how to help Regards, Thomas
|
SCJP 5.0, SCJD in progress
|
 |
marc weber
Sheriff
Joined: Aug 31, 2004
Posts: 11343
|
|
Originally posted by sruthi laya: ... I had set my classpath as C:\jdk1.3\bin...
That's the problem. You should not set a classpath. Was there anything in the classpath before you set it? If not, then you should remove the classpath variable entirely. If there was something in the classpath before you set it, then you might need to keep it, but you should add a dot (.) for the current directory. For example... (Note: It's the PATH -- not the CLASSPATH -- that should include your Java bin directory. These are different things.)
|
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
|
And why are you still using Java 1.3?
|
 |
sruthi laya
Greenhorn
Joined: Oct 15, 2008
Posts: 7
|
|
Hi , Thanks for the replies , Actually i was trying to have tomcat as well as java on my system. i had set PATH :C:\jdk1.3\bin JAVA_HOME : C:\jdk1.3\bin CATALINA_HOME : C:\Tomcat4.1 and deleted CLASSPATH ; Please guide me how can i run tomcat as well as my java programs . CLASSPATH is needed for java right ? please clear my doubts . thanks , sruthi.
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
You only need a CLASSPATH set on some systems; on Windows it must contain . and doesn't have to contain anything else. Get it working for ordinary Java first, then think about Tomcat.
|
 |
sruthi laya
Greenhorn
Joined: Oct 15, 2008
Posts: 7
|
|
Hey guys , I got my java program executed , but still facing a problem with tomcat. it is not starting . Anyway thanks a lot
|
 |
Campbell Ritchie
Sheriff
Joined: Oct 13, 2005
Posts: 32712
|
|
Well done ( ) so far. I think this is turning into a Tomcat-related question, so would sit better no the Tomcat forum . . . moving.
|
 |
Rene Larsen
Ranch Hand
Joined: Oct 12, 2001
Posts: 1179
|
|
Your JAVA_HOME is still wrong - it should be without the 'bin' folder Like this: JAVA_HOME=C:\jdk1.3
|
Regards, Rene Larsen
Dropbox Invite
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
How was tomcat installed - unzipping a zipped package or installing as a service? How are you trying to start Tomcat? What happens when you do? What operating system is this? If you are stuck with Windows98 then you are probably running into the environment space problem. Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Exception at runtime
|
|
|