Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception at runtime

 
sruthi laya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.)
 
Campbell Ritchie
Sheriff
Pie
Posts: 48985
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And why are you still using Java 1.3?
 
sruthi laya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48985
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 48985
60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your JAVA_HOME is still wrong - it should be without the 'bin' folder

Like this: JAVA_HOME=C:\jdk1.3
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic