jetty无法启动“无法创建虚拟机”当我添加 --exec 参数时
我在 Jetty 上遇到了最奇怪的错误。当我尝试启动它时,我收到“无法启动虚拟机”,下一行显示“无法识别的选项:-”。
我使用仅包含 java -jar start.jar 的批处理文件启动它,并且我有一个 ini 文件,其中基本上所有内容都被注释掉,只留下 --exec 行。
如果我也评论 --exec 那么 Jetty 就会启动,尽管没有我的 Web 应用程序迫切需要的 java VM 参数。
最奇怪的是,完全相同的配置在我尝试过的所有其他系统上运行都没有问题。
问题机器基于运行 64 位 JDK 6u29 的 Windows Server 2008 R2。
我几乎尝试了一切都无济于事,在互联网上搜索了一段时间,寻找可能再次遇到类似问题的人,但没有结果。
你们中有人看到过这个吗?或者您对如何解决这个问题有什么建议吗?
编辑:针对此问题,在 jetty 的 bugzilla 中输入了 bug。
I'm getting this strangest of errors with Jetty. When I try starting it I get "Unable to start virtual Machine" and next line say "Unrecognized Option: -".
I start it using a batch file containing simply java -jar start.jar and I have a ini file where basically everything is commented out with leaving only the --exec line.
If I comment also the --exec then Jetty starts, though without the java VM arguments my web app so desperately needs.
Strangest thing is that the exact same config run on all other system I tried it on without problems.
The problem machine is based on Windows server 2008 R2 running the 64 bit JDK 6u29.
I tried pretty much everything to no avail, searched to internet for a while for someone who might encountered a similar problem again without result.
Has any of you seen this or would you have suggestions as to how to tackle this issue.
EDIT: Entered a bug in jetty`s bugzilla for this issue.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
发现问题...
很简单,这是因为通往特定码头安装的路径包含空格和破折号:
还必须打开 --exec 选项。如果该选项关闭,一切都会正常运行,但是您将无法自定义虚拟机选项。
这导致在通过批处理文件启动时失败,该批处理文件使用相对路径来定位与应用程序打包在一起的虚拟机。
删除路径中的空格完全解决了问题相当
容易重现,只需获取基本的 jetty 包并创建一个批处理文件(它是类似于 bin 文件夹)
,然后双击它..
繁荣...世界末日!
可恶……那么近,却又那么远!这总是最简单的事情,不是吗?
found the problem...
quite simply it was because the path leading to that particular installation of jetty contained a space and a dash as such :
also the --exec option must be turned on. if the option is off everything runs fine, however you wont be able to customize your vm options.
that caused the this to fail when started through a batch file that used relative paths to locate the VM as it is packaged with the application.
removing the space in the path resolved the issue completely
Quite easy to reproduce, just get the basic jetty -package and create a batch file it it's bin folder akin to
and double click on it..
boom... end of the world !
darn... so close yet so far away ! it's always the simplest things that get to us isn't it !!