This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Adding new jar files" Watch "Adding new jar files" New topic

Adding new jar files

Sharanya Sharma
Ranch Hand

Joined: Jul 26, 2004
Posts: 54

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.

William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13007
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.
I agree. Here's the link:
subject: Adding new jar files
It's not a secret anymore!