Stan Stan - 8 months ago 22
Java Question

Eclipse RCP Application cannot use -vm & -console together?

In my Java application

, I have specified a dedicated version of JVM to use. If launching by double clicking the
, the application will use the JVM specified in the

However, if launching in command line with
option, it won't use the JVM specified in the
. Remove the -console option fixes the issue.

The error message is "
Java was started but returned exit code=1
". And in the pop up window, I am seeing both the
-vm <my JVM path>
-vm C:\Windows\system32\java.exe
. Looks like
option adding some extra options
to the launch configuration including the 2nd

Why is that? If I need both
options, how do I do that?


Turned out that I use my own JRE package, which has the java.dll deleted for shrinking package size. Without java.dll, the -console option won't work. Since there was no error message, so it's hard to find root cause.