你的tomcat版本是多少?tomcat 从4.1开始才支持JNI调用,你可以看tomcat的说明文档
Tomcat 4.1.x. Tomcat 4.1 is a refactoring of Tomcat 4.0.x, and contains significant enhancements, including:
JMX based administration features
JSP and Struts based administration web application
New Coyote connector (HTTP/1.1, AJP 1.3 and JNI support)
Rewritten Jasper JSP page compiler
Performance and memory efficiency improvements
Enhanced manager application support for integration with development tools