Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

class not found error

 
vijayan natarajan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all
when i compile java program at compile time there is no errror but in run time i got class not found error

what is the meaning that error
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

It generally means that one of the libraries that were in the classpath during compilation are not in the classpath at runtime. Which class is missing? Is its jar file in the WEB-INF/lib directory?
 
Syed Saifuddin
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi vijayan natarajan

Please tell me that you are amking a command line java program or working on web application.

If you are working on command line single file application. Just check the file name and class name is matching or not(case sensitive).

if it is a web application then put all your lib in WEB-INF/lib directory file
 
Gayathri Chowduru
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pls check if your compiled java class file is in the classpath or not.

Thanks,
Gayathri.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Gayathri Chowduru,
Welcome to JavaRanch!

In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see:
UseRealWords

Abbreviations such as "u" or "ur" in
place of "you" and "you are" or "you're" confound language translation software making
it hard for our non-English speaking members to read your posts.
"plz" is not a word in the English language.

Again, welcome to JavaRanch and good luck with your question.
-Ben
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, until we know if this is a web app or not, we can't really advise the original poster on classpath issues.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic