如何使用不同的 Java 版本运行 Eclipse? [英] How to run Eclipse with different Java version?
问题描述
我正在使用 Eclipse 开发 BlackBerry 应用程序.我的计算机上目前有 JDK/JRE 7,但这会使 BlackBerry 插件崩溃.实际上是一个已知问题,唯一需要做的就是使用 JDK/JRE 6 而不是 7 运行 Eclipse.
I am using Eclipse for developing BlackBerry Applications. I have JDK/JRE 7 currently on my computer, but that makes the BlackBerry plugins crash. Actually is a known issue and the only thing need to be done is run Eclipse with JDK/JRE 6 instead of 7.
我下载并安装了版本 6.但是我很确定 Eclipse 仍然使用 7.一年前我遇到了同样的问题,我记得我必须配置一些系统变量并且它起作用了,但我真的找不到立即解决.
I downloaded and installed version 6. However I am pretty sure Eclipse still uses 7. I had the same problem a year ago and I remembered I had to configure some System Variables and it worked, but I can't really find the solution now.
对这个有什么想法吗?重要的!我不想在版本 6 中编译,这意味着我只需要通过 Eclipse 选择 Java 版本.我需要的是 Eclipse start
版本 6.
Any idea on this one? Important! I don't want to compile in version 6, which means I just have to choose the Java version through Eclipse. What I need is Eclipse to start
with version 6.
推荐答案
- 打开 Eclipse 文件夹中的 Eclipse 配置文件
eclipse.ini
. 添加
-vm yourPathJavajre6injavaw.exe
如:-startup plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -vm C:Javajre6injavaw.exe ...
如果路径包含空格,则无需对它们进行转义,请参阅 Eclipse Wiki 了解更多规格.-vm
选项和路径必须在不同的行上.-vm
选项必须在 -vmargs
选项之前.在 Linux 上,路径通常是 /bin/java
而不是上面显示的 Windows 路径.您必须使用 Java 并且 Eclipse 版本必须匹配(即 32 位 Eclipse 在 32 位 Java 上运行,64 位 Eclipse 在 64 位 Java 上运行).
If the path contains spaces there is no need to escape them, see the Eclipse Wiki for more specs. The -vm
option and the path must be on separate lines. The -vm
option must come before the -vmargs
option. On Linux, the path would typically be /bin/java
instead of the Windows path shown above. You must use the Java and Eclipse versions must match (i.e. 32-bit Eclipse runs on 32-bit Java and 64-bit Eclipse runs on 64-bit Java).
这篇关于如何使用不同的 Java 版本运行 Eclipse?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!