从命令行使用 Java Service Wrapper 将任意 jar 附加到类路径?
我想使用 Java Service Wrapper 运行我的应用程序,并从命令行将某些内容附加到类路径中。
所以我有命令行:
wrapper.exe -c app.conf \
wrapper.ignore_sequence_gaps=TRUE \
wrapper.java.classpath.200=path/to/extra/jar \
wrapper.debug=TRUE
但是额外的 jar 不在传递给我的应用程序的类路径中。
I want to run my application using Java Service Wrapper and append something to the classpath from the command line.
So I have the command line:
wrapper.exe -c app.conf \
wrapper.ignore_sequence_gaps=TRUE \
wrapper.java.classpath.200=path/to/extra/jar \
wrapper.debug=TRUE
But the extra jar is not in the classpath passed to my application.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您使用什么版本的包装器?
旧版本的包装器要求类路径元素必须严格排序。顺序中的任何间隙都会导致包装器在该特定点停止。
在命令行中,您发布的类路径元素是 200,这意味着您的conf 文件中必须有 199 个声明才能完成这项工作....
为了使事情变得更简单,您应该至少运行 3.3.6自该版本以来,添加了 wrapper.ignore_sequence_gaps 属性。
在命令行或conf 文件中将以下属性设置为 TRUE。它应该有效。
编辑:抱歉,我刚刚注意到您已经在命令行中将wrapper.ignore_sequence_gaps设置为TRUE...所以您可能正在运行包装器的早期版本。
此致,
what version of the Wrapper are you using?
The older versions of the Wrapper required that the classpath elements had to be strictly ordered. any gap in the ordering caused the Wrapper to stop at that certain point.
In the command line you posted the classpath element is 200, which means you would have to have 199 declarations in your conf file in order to make this work....
To make things more easy, you should run at least 3.3.6 for this since that version the wrapper.ignore_sequence_gaps property was added.
Set the following property either in the command line or the conf file to TRUE. and it should work.
Edit: Sorry, I just noticed you are already setting wrapper.ignore_sequence_gaps to TRUE in the command line... So probably you are running an earlier version of the wrapper.
Best regards,