• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat start-up error and setting CLASSPATH permanently

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic