[英]Eclipse RCP Application cannot use -vm & -console together?
In my Java application .ini
, I have specified a dedicated version of JVM to use. 在Java应用程序
.ini
,我指定了要使用的专用JVM版本。 If launching by double clicking the .exe
, the application will use the JVM specified in the .ini
. 如果通过双击
.exe
启动,则应用程序将使用.ini
指定的JVM。
However, if launching in command line with -console
option, it won't use the JVM specified in the .ini
. 但是,如果使用
-console
选项在命令行中启动,它将不使用.ini
指定的JVM。 Remove the -console option fixes the issue. 删除-console选项可解决此问题。
The error message is " Java was started but returned exit code=1
". 错误消息是“
Java was started but returned exit code=1
”。 And in the pop up window, I am seeing both the -vm <my JVM path>
and -vm C:\\Windows\\system32\\java.exe
. 在弹出窗口中,我同时看到
-vm <my JVM path>
和-vm C:\\Windows\\system32\\java.exe
。 Looks like -console
option adding some extra options to the launch configuration including the 2nd -vm
. 看起来
-console
选项为启动配置添加了一些额外的选项 , 包括2nd -vm
。
Why is that? 这是为什么? If I need both
-vm
& -console
options, how do I do that? 如果我同时需要
-vm
和-console
选项,该怎么做?
Turned out that I use my own JRE package, which has the java.dll deleted for shrinking package size. 原来,我使用了自己的JRE软件包,该软件包已删除java.dll以缩小软件包大小。 Without java.dll, the
-console
option won't work. 如果没有java.dll,
-console
选项将无法使用。 Since there was no error message, so it's hard to find root cause. 由于没有错误消息,因此很难找到根本原因。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.