简体   繁体   English

带有Java SE 7的Eclipse Juno

[英]Eclipse Juno with Java SE 7 Issue

I am trying to configure Eclipse Juno with Java SE 7 Here's my eclipse.ini 我正在尝试使用Java SE 7配置Eclipse Juno,这是我的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. 我尝试将-vm更改为C:/Program Files/Java/jdk1.7.0_07/bin ,甚至尝试删除。

Still same error Failed to Create Java virtual machine. 仍然相同的错误Failed to Create Java virtual machine.

Using Windows 7 x32 OS . 使用Windows 7 x32 OS

I have both Java 6 SE and Java 7 SE for different purposes. 我同时具有Java 6 SE和Java 7 SE以用于不同的目的。

If i give -vm as C:/Program Files/Java/jdk1.6/bin it's working fine. 如果我给-vm作为C:/Program Files/Java/jdk1.6/bin它工作正常。

What's the issue here. 这是什么问题。 Path to JDK is fine. 通往JDK的路径很好。

I experimented little and found that 我很少尝试,发现

-Xmx800m

is the maximum amount I can set as -Xmx value. 是我可以设置为-Xmx值的最大数量。 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. 为什么Java 6 SE能够做与Java 7 SE无法做的事情相同的事情。 My project is huge. 我的计划很大。 I hit Eclipse 1.4Gb memory sometimes. 我有时会碰到Eclipse 1.4Gb内存。

Is there a specific reason why you are trying to launch Juno with Java 7 JVM? 为什么要尝试使用Java 7 JVM启动Juno有特定原因吗? 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? 您不仅可以在Juno的JRE首选项(即:Preferences-> JRE)中添加/配置Java 7 jdk / jre并以此方式使用它吗? Or do you have a specific reason why you are trying to launch it with java 7? 还是您有尝试使用Java 7启动它的特定原因?

Try -vm C:/Program Files/Java/jdk1.7.0_07/bin/javaw.exe . 尝试-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. 默认情况下,Eclipse启动器使用jvm.dll,它提供了一些好处(例如任务栏中的Eclipse图标),但是Windows上的DLL会受到内存碎片的影响。 Different DLLs on your system are pinned into different locations. 系统上的不同DLL固定在不同的位置。 This can present a problem as the amount you specify via -Xmx must be contiguous or JVM will not start. 由于您通过-Xmx指定的数量必须是连续的,否则JVM不会启动,因此可能会出现问题。

The ultimate fix is to switch to a 64-bit version of Windows. 最终的解决方法是切换到Windows的64位版本。 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. 不要尝试编辑eclipse.ini,如果要将eclipse配置为Java 7,请尝试以下简单方法。 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......... 在系统变量中,设置路径以使Java 7首先出现在C:\\ Program Files \\ Java \\ jdk1.7.0_02 \\ bin; C:\\ Program Files(x86)\\ Java \\ jdk1.6.0_05 \\ bin;。; C :\\ Program文件.........

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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