• Post Reply Bookmark Topic Watch Topic
  • New Topic

class is missing error  RSS feed

 
Sen Aff
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just don't get it...i am trying to compile a class and
the prompt tells me that the class is missing mean while the
class is in the said folder.

gladis@gladis-desktop:~$ javac -classpath /usr/share/tomcat5.5/common/lib/servlet-api.jar:classes:. -d classes src/com/example/web/SalCal.java
incorrect classpath: classes
File src/com/example/web/SalCal.java is missing

thanks for the concern.

Senyo.
 
James Bukowska
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

You could try adding your classpath to the environment variable then echo it to ensure you know what the content is...

The error message "incorrect classpath: classes" is telling you the the classes directory you added to the classpath is invalid - try putting the full path to the directory classes, if the directory was in /u/user/classes then add export "$CLASSPATH=$CLASSPATH:/u/user/classes"

Note: if you wantd the classes directory to be the first dir to look in for your classes then add the reference to the beginning instead of the end of the export e.g. export CLASSPATH="/u/user/classes:$CLASSPATH"

Without seeing more I'm only guessing but I'm fairly sure its because you haven't directly referenced the full path of your classes directory :classes: should be /u/whereevermyclassdirectorylives/"
 
Sen Aff
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks a lot James....you pointed out what the problem was.
actually the class path was wrong just like you predicted.
i appreciate your help.

Senyo.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!