Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat start-up error and setting CLASSPATH permanently

 
Giri Thava
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic