一、發現問題
在啟動tomcat5.5的時候發現console中有一句話the apache portable runtime which allows the optimal performance in production environments was not found on the java.library.path。這是個定語從句,翻譯為:可以允許在生産環境中有最佳的表現的apache portable runtime沒有再java.libary.path中被找到。
二、apr作用
apache portable runtime是一個用c語言寫成檔案包,目的在于提高tomcat的服務性能,進而使得tomcat将不僅僅擔任一個應用伺服器的功能,而是要成為一個一般的web伺服器(general urpose webserver),就是提升web靜态頁面的處理能力。portable意思為便攜的。
三、解決問題
首先要到tomcat網站下載下傳:http://tomcat.apache.org/download-native.cgi找到native 1.1.13 source release zip這是個源檔案,如果要自己編譯就下這個,如果想使用已編譯好的dll檔案就點選這個連結下面的“here“連結,找一個版本号最新的,進去可以下載下傳一個tcnative-1.dll檔案。
配置該檔案的簡單方法就是把這個檔案扔到windows/system32下面,因為已經在path下配置好了這個路徑,系統啟動後就可以找到這個路徑下的檔案。若想放到自己指定的位置,比如tomcat安裝路徑下,那麼就要在path中指定好這個路徑。可以首先根據慣例在系統變量中設定catalina_home變量,然後再把%catalina_home%/bin加入到path中,然後再把下載下傳的dll檔案放到bin路徑下就可以了。
原帖位址:http://blog.csdn.net/pipipig521/article/details/3323795