Tomcat 无法识别 DLL 文件
我有一个应用程序尝试在 Window 的 Tomcat 5.5 中部署 - 作为 Axis Webservice。该应用程序使用了很少的 DLL 文件,我将其放置在目录 - $TOMCAT_HOME\common\endorsed\ 中,并在 java.library.path
中指定了相同的文件。
但是Tomcat 无法识别DLL 文件。抛出以下异常:
java.lang.UnsatisfiedLinkError: no FCCJavaClientProxy in java.library.path
我也尝试将 DLL 放入 jar 文件中..但没有用。
以下是我创建的用于启动 Tomcat 的批处理文件。
set CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5\
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15\
set JAVA_OPTS=-Djava.library.path=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed;D:\TeamCenter\fms;
set FMS_HOME=D:\TeamCenter\fms
call tomcat5.exe
编辑:我创建了一个单独的批处理文件,因为 tomcat 5.5 没有任何批处理文件,我可以在其中设置上述环境变量或 lib 路径
i've an application which am trying to deploy in Window's Tomcat 5.5 - as an Axis Webservice. The application uses few DLL files, which I've placed the in the dir - $TOMCAT_HOME\common\endorsed\ and specified the same in the java.library.path
.
But the DLL files are not recognized by the Tomcat. Following Exception is thrown:
java.lang.UnsatisfiedLinkError: no FCCJavaClientProxy in java.library.path
I also tried by putting the DLLs in a jar files..but no use.
Following is the batch file I created to start a Tomcat.
set CATALINA_HOME=C:\Program Files\Apache Software Foundation\Tomcat 5.5\
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_15\
set JAVA_OPTS=-Djava.library.path=C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\endorsed;D:\TeamCenter\fms;
set FMS_HOME=D:\TeamCenter\fms
call tomcat5.exe
EDIT: I've created a separate batch file because, tomcat 5.5 does not have any batch files where I can set the above env variables or lib path
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么你创建了自己的批处理文件而不是使用Tomcat 附带的startup.bat 和catalina.bat?我愿意猜测直接调用 tomcat5.exe 实际上并没有使用您正在设置的环境变量。
设置自定义环境变量的最佳方法是将它们添加到
bin
文件夹中名为setenv.bat
的文件中,当您调用时,Tomcat 将在启动或关闭时调用此脚本startup.bat
/shutdown.bat
。How come you created your own batch file instead of using the startup.bat and catalina.bat that come with Tomcat? I would be willing to guess that invoking tomcat5.exe directly does not actually use the environment variables you are setting.
The best way to set custom environment variables is to add them to a file named
setenv.bat
in thebin
folder, Tomcat will invoke this script on startup or shutdown when you callstartup.bat
/shutdown.bat
.