Big Moose Saloon
 Search | Java FAQ | Recent Topics Register / Login

# 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: 12565

1
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:

Yes there is a learning curve to ANT but you will be glad you invested the time.
Bill

Java Resources at www.wbrogden.com

It is sorta covered in the JavaRanch Style Guide.

subject: Tomcat start-up error and setting CLASSPATH permanently