简体   繁体   中英

Eclipse Juno with Java SE 7 Issue

I am trying to configure Eclipse Juno with Java SE 7 Here's my eclipse.ini

-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
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512M
-vm
C:/Program Files/Java/jdk1.7.0_07/bin/javaw.exe
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-Xms128m
-Xmx1024m

I tried to change to -vm to C:/Program Files/Java/jdk1.7.0_07/bin and even tried to remove.

Still same error Failed to Create Java virtual machine.

Using Windows 7 x32 OS .

I have both Java 6 SE and Java 7 SE for different purposes.

If i give -vm as C:/Program Files/Java/jdk1.6/bin it's working fine.

What's the issue here. Path to JDK is fine.

I experimented little and found that

-Xmx800m

is the maximum amount I can set as -Xmx value. If i increase it beyond that, it's failing to create. Why is it so? Why JAVA 6 SE is able to do the same thing where as Java 7 SE unable to do. My project is huge. I hit Eclipse 1.4Gb memory sometimes.

Is there a specific reason why you are trying to launch Juno with Java 7 JVM? Can you not just add/configure the java 7 jdk/jre in the JRE Preferences of Juno (ie: Preferences->JRE) and use it that way? Or do you have a specific reason why you are trying to launch it with java 7?

Try -vm C:/Program Files/Java/jdk1.7.0_07/bin/javaw.exe . By default, Eclipse launcher uses jvm.dll, which provides some benefits (like Eclipse icon in the task bar), but DLLs on Windows are subject to memory fragmentation. Different DLLs on your system are pinned into different locations. This can present a problem as the amount you specify via -Xmx must be contiguous or JVM will not start.

The ultimate fix is to switch to a 64-bit version of Windows. Even if you don't have a lot of physical memory, the bigger virtual address space will make memory fragmentation not an issue.

Don't try to edit eclipse.ini,if you want config eclipse to java 7, try this simple thing. In System variables set the path such that java 7 should come first as C:\\Program Files\\Java\\jdk1.7.0_02\\bin;C:\\Program Files (x86)\\Java\\jdk1.6.0_05\\bin;.;C:\\Program Files.........

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