今天在Eclipse上配置Tomcat7,启动时看到如下警告信息:

The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path

感到很不舒服,于是在网上找了些解决办法。

以下内容来自:http://cooliron.blog.163.com/blog/static/124703138201112211571276/

在eclipse中,启动tomcat时会出现如此信息:The APR based Apache Tomcat Native library which  allows optimal performance in production environments was not found on the  java.library.path,它其实不影响程序的正常运行,但看到了,感觉实在别扭。其解决办法如下:

http://tomcat.heanet.ie/native/下载tcnative-1.dll,然后放到你的JDK路径下的bin目录下。重新启动tomcat,就没有问题了。

这个tcnative-1.dll 他的作用如下:

tomcat整合本地apr会使效率提升:

    一是,处理静态资源的时候速度更快,(注:有人用jmeter,对使用apr前后的tomcat进行压力测试,结果显示,性能是有一定的提升,但是没有想象中多,只有一点点,当然,这与运行的逻辑有关,但是我个人认为在大多数情况下这部分性能提升甚微)。

    二是,我认为提升比较多的是对ssl的处理效率,当tomcat处理https的请求是,如果使用本地的openssl库,肯定会比前面提升的效率高。(虽然没有实际测试数据,但我推测这里的性能提升比例上要比第一点多得多)。

原因上面已经说得很清楚了,下面说下我的解决办法。

首先,tcnative-1.dll不需要下载,至少对于Tomcat7来说是这样,我们可以在其bin目录下找到这个dll;

其次,tcnative-1.dll放在哪儿不要紧,只要在系统的PATH中可以找到就行。

解决:

在系统的环境变量中添加CATALINA_HOME,它指向你的Tomcat根目录,接着在PATH路径中添加%CATALINA_HOME%\bin;

这样就可以解决了,对了,设置完成后,可能需要重启下Eclipse。

转:http://jasonhan-sh-hotmail-com.iteye.com/blog/1472911

关于The APR based Apache Tomcat Native library警告的更多相关文章

  1. 关于Tomcat启动时报The APR based Apache Tomcat Native library which allows optimal performanc e in production environments was not found on the java.library.path

    错误信息如下 八月 01, 2016 10:11:15 上午 org.apache.catalina.core.AprLifecycleListener initINFO: The APR based ...

  2. The APR based Apache Tomcat Native library 异常解决办法

    tomat在linux服务器上启动报The APR based Apache Tomcat Native library which allows optimal performance in pro ...

  3. The APR based Apache Tomcat Native library

    Tomcat启动的时候出现下面这样的提示: 2015-11-06 14:24:12 org.apache.catalina.core.AprLifecycleListener init 信息: The ...

  4. The APR based Apache Tomcat Native library tomcat启动错误

    The APR based Apache Tomcat Native library which allows optimal performance in production environmen ...

  5. Linux下Springboot解决`APR based Apache Tomcat Native library`提示

    最近转行做java,开发基于Springboot的项目,版本号为2.1.0.RELEASE. 启动应用,发现以下提示: The APR based Apache Tomcat Native libra ...

  6. An incompatible version [1.1.29] of the APR based Apache Tomcat Native library is installed, while Tomcat requires version [1.2.14]

    问题描述   首先,这是一个提示信息而不是报错,并不影响 Tomcat 的使用.它是建议你使用一个 Tomcat 的性能调优原生库文件 tcnative-1.dll   几天前,我想尝试一下 Apac ...

  7. 【问题解决:信息提示】SpringBoot启动时提示The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path

    问题描述 springboot程序在启动时提示信息 [2018-10-24 21:59:05.214] - 440 信息 [restartedMain] --- org.apache.catalina ...

  8. SEVERE: An incompatible version 1.1.27 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.32

    问题: SEVERE: An incompatible version 1.1.27 of the APR based Apache Tomcat Native library is installe ...

  9. The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path:

    运行环境: Intellij idea 14 在改了项目名称. 运行时候出现了 The APR based Apache Tomcat Native library which allows opti ...

随机推荐

  1. php curl_init函数用法

    原文地址:curl_init函数用法">php curl_init函数用法作者:loading 使用PHP的cURL库可以简单和有效地去抓网页.你只需要运行一个脚本,然后分析一下你所抓 ...

  2. CSS排版页面

    创建CSS文件如下: @charset "utf-8"; /* CSS Document */ *{ margin:0px; padding:0px; border:0px; } ...

  3. struts启动报错Javassist library is missing

    很久不用struts2,最近在配置的时候,启动服务器报错 Caused by: java.lang.ExceptionInInitializerError at com.opensymphony.xw ...

  4. 关于打开ILDASM的方法

      1.通过VisualStudio在开始菜单下的Microsoft Visual Studio 2008/Visual Studio Tools/中的命令提示符中输入ildasm即可 2.将其添加至 ...

  5. oracle学习笔记3:基本的SQL语句

    oracle基本的SQL语句和SQLSERVER基本一样,在这里只简单列出与SQLSERVER不一样的地方 1.select * from orderinfo where address = 'abc ...

  6. C语言malloc()函数:动态分配内存空间

    头文件:#include <stdlib.h> malloc() 函数用来动态地分配内存空间(如果你不了解动态内存分配,请查看:C语言动态内存分配及变量存储类别),其原型为:void* m ...

  7. Oracle学习【语句查询】

    基本查询语句any和all不能单独使用,必须和比较符一起使用>any 大于最小的例如:select * from emp where sal >any(1000,2000);<any ...

  8. C++自定义异常处理

    自定义异常类 class MyException { public: MyException() { } MyException(char* str) { msg = str; } MyExcepti ...

  9. Python之练习Demo

    遍历本地文件系统 (sys, os, path),例如写一个程序统计一个目录下所有文件大小并按各种条件排序并保存结果,代码如下: #coding:GBK import os; def SortList ...

  10. 读取XML文件节点数据

    xml测试文件为 <?xml version="1.0" standalone="yes"?> <NewDataSet> <xs: ...