今天做java web 的时候启动服务器控制台报错,
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found onthejava.library.path: G:\my\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\bin;G:\my\Common\plugins\com.genuitec.eclipse.easie.tomcat.myeclipse_9.0.0.me201109141806\tomcat\bin
看错误信息,英语那么破的我 也看出来了是什么东西在这路径下找不到错误应该与tomcat 有关,果断重新安装一下tomcat7 结果。。果断的跪了 错误信息有点变化
The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path
但是并没发现因为什么,百度一下吧 参考:
https://www.cnblogs.com/ssh2/p/3994219.html 写的注释掉这段监听器,好吧,先试试
运行后发现多了这一行
support is not available when running on Java 6. To suppress this message, run Tomcat on Java 7, remove the WebSocket JARs from $CATALINA_HOME/lib or add the WebSocket JARs to the tomcat.util.scan.DefaultJarScanner.jarsToSkip property in $CATALINA_BASE/conf/catalina.properties. Note that the deprecated Tomcat 7 WebSocket API will be available.
但是上面的错误信息确实没有了,我不知道这个与上一个是不是同一个毛病,所以我打算先把注释的恢复回去,然后再想想办法
。。有个问题,myeclipse 中tomcat部署的项目居然无法删除?退了myeclipse也不行,,,在任务管理器中找到了tomcat7 run.exe 结束进程,果断能删除部署在tomcat中的项目了,重启myeclipse没有部署项目单独启动tom 还是有这个问题,继续百度 参考:https://blog.csdn.net/lc_apple/article/details/6116908 觉得这个博主说的跟上面那个有异曲同工之妙,在这里说,其实报这个错误大致就是因为tom加了新的功能,就是上面注释掉的这个APR功能,大家都在进步吗,tom也在寻求进步。什么时候需要知道了,在自己查资料吧,我还有下个bug需要解决,做好demo好找工作啊
具体解决就是http://tomcat.apache.org/download-native.cgi 下的here连接下载一个tomcat-native-*******.zip这种名字的压缩包解压出来个tcnative-1.dll 放到上面报错的路径下,就消停了
整理一下
这个问题就是找一个tcnative-1.dll 文件放到报错的bin路径下就能解决,
然后这个文件到哪里找呢
http://tomcat.apache.org/download-native.cgi 页面里找到这句话
You can find binaries release too. You may download them from HERE 就是这个HERE点开然后下载,然后解压出tcnative-1.dll 就ok了