简体   繁体   中英

Eclipse Juno with JRE 7 causes problems on startup

The issue that is explained seems to be a common one and different solutions have been proposed already, many of which work. One example of this discussion can be found here .

My question is more about why rather than how .

We have been wrestling with this issue here ourselves as well and found that if we launch eclipse using javaw.exe the problem occurs, but if we invoke Eclipse using jvm.dll the problem does not appear. Even though in both cases the eclipse.ini remained same.

To explain my case I will use the example of launching eclipse.exe from command line with a single -vm argument. For reference below is the eclipse.ini that we are using:

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
--launcher.XXMaxPermSize
256m
-vmargs
-Xms128m
-Xmx1280m
-XX:MaxPermSize=512m
-Dderby.stream.error.field=java.lang.System.err

You can see that the memory requested for allocation is quite a lot for both heap (1280m) and PermGen (512m). If you are unable to reproduce the issue you can try increasing the memory until the error occurs.

There are three different command lines that you may use:

eclipse.exe -vm ..\jre\bin\javaw.exe
eclipse.exe -vm ..\jre\bin
eclipse.exe -vm ..\jre\bin\client\jvm.dll

Only the first one causes the error (javaw.exe). The remaining two options launch eclipse successfully. Reducing memory requirement in eclipse.ini also fixes the problem obviously.

So my question is, why does javaw.exe fail when the other two command lines work? What is the difference between choosing these different paths? Does one enforce parameters more strictly than the others?

Environment: Eclipse: 3.8-win32, JRE: 7u7-win32, Windows 7 x64

I can't explain why pointing Eclipse to the executable fails but the dll does not, but I can offer this to explain the problem. The gist of it is that on Windows, the JVM needs to allocate a contiguous chunk of memory for your heap, and if it can't then it fails to start.

Perhaps this page will help figure out why pointing to the dll seems to work. Otherwise, I'd ask on the Eclipse Equinox forum .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM