File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat start-up error and setting CLASSPATH permanently Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat start-up error and setting CLASSPATH permanently" Watch "Tomcat start-up error and setting CLASSPATH permanently" New topic
Author

Tomcat start-up error and setting CLASSPATH permanently

Giri Thava
Ranch Hand

Joined: Jun 22, 2006
Posts: 38
Problem 1:
When I start up Tomcat 5.5.12, the Tomcat displays following error message..

The Apache Portable Runtime which allows optimal
performance in production environments was not
found on the java.library.path:

The sample applications are running properly, but how can I fix this error?

Problem 2:
In Tomcat 4.0, we can copy the servlet.jar from Tomcat directory to jre/lib/ext, therefore we don't need to type "-CLASSPATH" in the command prompt.
Now I am using Tomcat 5.5.12 and I copied servlet-api.jar from tomcat directory to jre/lib/ext directory, but this time it is not working,i.e I have to type -CLASSPATH to compile a servlet.

I set CLASSPATH in the Environment Variables also, but still it is not working. How can I avoid typing -CLASSPATH each and every time when I compile a servlet?

I am using WindowsXP Pro, Java 1.5 and Tomcat 5.5.12.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
How can I avoid typing -CLASSPATH each and every time when I compile a servlet?

Personally I use ANT and avoid such problems. It allows me to have multiple versions of various libraries and define a classpath variable for each compilation job.
For example, here is one of the simplest ones:

The compilation task is defined:

Yes there is a learning curve to ANT but you will be glad you invested the time.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat start-up error and setting CLASSPATH permanently