This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 12759
    
    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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Adding new jar files
 
Similar Threads
JAR/Class File Obfuscation problem
problem in jstl struts
error in downloading file
Apache Tomcat - JDBC error
Class NOT FOUND in Tomcat