File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 13037
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!