wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Exception at runtime Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Exception at runtime " Watch "Exception at runtime " New topic
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: 38456
    
  23
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: 38456
    
  23
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: 38456
    
  23
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: 12769
    
    5
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception at runtime