无法识别的选项:-无法创建Java虚拟机 [英] Unrecognized option: - Could not create the Java virtual machine
问题描述
我正在尝试在Linux服务器上运行.jar
文件.
I am trying to run my .jar
file on a linux server.
这些是我正在运行的命令:
These are the commands I'm running:
JAVA_HOME=/app/local/opt/jdk/packages/jdk1.6.0_30/
export PATH=$JAVA_HOME/bin:$PATH
cd folder
nohup java -jar program.jar &
在星期五跑步时,它运行良好.但是,今天我得到了:
When ran on Friday, this was working perfectly. However, today I am getting:
Unrecognised option: - Could not create the Java virtual machine.
在我的nohup.out中
In my nohup.out
如果在设置路径后运行java -v
,则会遇到相同的问题.有人可以建议什么吗?真的很困惑.
If I run java -v
after setting the path I get the same problem. Can anyone suggest anything? Really confused about this.
感谢您的帮助.
推荐答案
通常,当我们收到此类异常(导致无法创建Java虚拟机"的无法识别的选项")时,JVM将显示无法识别的异常选项,例如:
Usually, when we get this kind of exception ("Unrecognised option" which causes the "Could not create the Java virtual machine"), the JVM displays the unrecognized option, like this:
Unrecognised option: -[option details] Could not create the Java virtual machine.
您没有详细信息的事实使您好像在命令中只有一个空格(").
the fact that you have no details makes it seem as though you just have a space (" ") in your command.
再次查看以确保.
这篇关于无法识别的选项:-无法创建Java虚拟机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!