1.在tomcat5.5啟動時可能會收到下面的資訊:
Oct 30, 2006 11:54:51 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/local/jdk1.5.0_08/jre/lib/i386/server:/usr/local/jdk1.5.0_08/jre/lib/i386:/usr/local/jdk1.5.0_08/jre/../lib/i386
這表示沒有找到APR,在tomcat文檔中有對tomcat與apr的關係的描述,並說明了APR的好處,參考連結如下:
http://tomcat.apache.org/tomcat-5.5-doc/apr.html
2.到APACHE網站去下載APR並安裝,連結:http://apr.apache.org/
3.安裝Apache Tomcat Native library,在tomcat/bin的目錄下可以找到這個native包,但版本為1.1.3,安裝後再啟動,會得到如下提示:
Oct 30, 2006 12:40:42 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: An older version 1.1.3 of the Apache Tomcat Native library is installed, while Tomcat recommends version greater than 1.1.4
因此可以到下面網站下載新版:http://tomcat.heanet.ie/native/,目前最新為1.1.6,
4.安裝好後按照提示資訊設定一下環境變數,再啟動就可以成功載入APR了。