Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Exception at runtime

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 11343
Mac Safari Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.)
 
Marshal
Posts: 79630
380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79630
380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Marshal
Posts: 79630
380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic