找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse

2023-08-24Java开发问题
6

本文介绍了找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我在 Windows 7 上下载了最新的 Eclipse.当我单击 Eclipse 图标时,它会引发以下异常:

I downloaded the latest Eclipse on Windows 7. When I click the eclipse icon it throws the following exception:

我已经安装了 JRE 和 JDK.

I have already installed JRE and JDK.

更新:Eclipse.ini 内容:

UPDATE: Eclipse.ini contents:

   -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.v20120913-144807
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
-vm C:Program Files (x86)Javajre7in

推荐答案

根据 Eclipse 文档,您可能需要在 VM args 之前指定 VM,并且路径不应与 -vm 开关在同一行:

According to the Eclipse documentation, you may need to specify the VM before the VM args, and the path should not be on the same line as the -vm switch:

  • -vm 选项及其值(路径)必须位于不同的行中.
  • 该值必须是 Java 可执行文件的完整绝对或相对路径,而不仅仅是 Java 主目录.
  • -vm 选项必须出现在 -vmargs 选项之前,因为 -vmargs 之后的所有内容都直接传递给 JVM.

来源:Eclipse Wiki

例如:

-vm
C:JavaJDK1.6injavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024m

您可能还需要用一些引号括住您的路径,因为它包含空格.我总是将 Eclipse 和 Java 之类的东西安装在没有空格的根目录中,而不是在 Program Files 下,以避免这个问题.

You also might need to surround your path with some quotes, since it contains spaces. I always install things like Eclipse and Java in root directories with no spaces, not under Program Files, to avoid this problem.

这篇关于找不到在 Windows 7 JRE 和 JDK 上运行 Eclipse的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

如何使用 JAVA 向 COM PORT 发送数据?
How to send data to COM PORT using JAVA?(如何使用 JAVA 向 COM PORT 发送数据?)...
2024-08-25 Java开发问题
21

如何使报表页面方向更改为“rtl"?
How to make a report page direction to change to quot;rtlquot;?(如何使报表页面方向更改为“rtl?)...
2024-08-25 Java开发问题
19

在 Eclipse 项目中使用西里尔文 .properties 文件
Use cyrillic .properties file in eclipse project(在 Eclipse 项目中使用西里尔文 .properties 文件)...
2024-08-25 Java开发问题
18

有没有办法在 Java 中检测 RTL 语言?
Is there any way to detect an RTL language in Java?(有没有办法在 Java 中检测 RTL 语言?)...
2024-08-25 Java开发问题
11

如何在 Java 中从 DB 加载资源包消息?
How to load resource bundle messages from DB in Java?(如何在 Java 中从 DB 加载资源包消息?)...
2024-08-25 Java开发问题
13

如何更改 Java 中的默认语言环境设置以使其保持一致?
How do I change the default locale settings in Java to make them consistent?(如何更改 Java 中的默认语言环境设置以使其保持一致?)...
2024-08-25 Java开发问题
13