Can you re-check if the jar is in the folder that you specified. Also can you show us the code in which you are trying to access a class from that jar. Maybe you've made a mistake in capitalization or something else...
Riley Thomas wrote:The jr.jar file is definitely located in the /lib directory.
I guess you mean the ~/tomcat/apache-tomcat-6.0.20/lib directory, as that's what you're putting in the classpath?
It looks like you're using a Unix-like operating system (maybe Linux or Mac OS X). Check if the jr.jar file contains what you expect. Try this command to list what's inside the jar:
jar tvf ~/tomcat/apache-tomcat-6.0.20/lib/jr.jar
It should show you a list of the files and directories in the jar file. Does it contain a directory com/javaranch/common?
Joined: Aug 08, 2009
I double-checked the file and it does contain the com/javaranch/common directory.
Correct, I am using OS X with Java 1.5.
I've found that if I reverse the order of the jar files - typing:
$ javac -cp ~/tomcat/apache-tomcat-6.0.20/lib/jr.jar:~/tomcat/apache-tomcat-6.0.20/lib/servlet-api.jar -d classes src/***.java - it returns errors regarding the javax.servlet classes; so whatever comes second in that classpath list doesn't work.