Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Tomcat and the fly likes Adding new jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Adding new jar files" Watch "Adding new jar files" New topic
Author

Adding new jar files

Sharanya Sharma
Ranch Hand

Joined: Jul 26, 2004
Posts: 54
Hi,

As per the previous discussion Tomcat5 jar filesI have added the jar file to the tomcat/shared/lib directory.

But I am still unable to access it in my .java file(import statement). Please help me with this.

Thx,
Sharanya
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12769
    
    5
The requirements for Tomcat to see the jar file when running are not the same as the requirements for the Java compiler to find the jar file when compiling.
Tomcat ignores the classpath but for the compiler to see the jar file, it must be on the classpath. Your java installation tooldocs directory has a nice discussion in findingclasses.html.
Bill
 
wood burning stoves
 
subject: Adding new jar files