eclipse 无法在 Windows 10 上运行
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32162013/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
eclipse doesn't run on windows 10
提问by user3557777
I have tried to install two differens versions of Eclipse on windows 10 without any succes,the versions which I tried to install were eclipse-java-mars-R-win32-x86_64 and eclipse-java-luna-SR2-win32-x86_6,in the first time whenever I was trying to run the application it was giving the error message that indicated the problem was the java version I then installed the required java version but unfortunately it didn't solve the problem as now it doesn't show the error message nor does it run!!
我试图在 Windows 10 上安装两个不同版本的 Eclipse,但没有任何成功,我尝试安装的版本是 eclipse-java-mars-R-win32-x86_64 和 eclipse-java-luna-SR2-win32-x86_6,在第一次尝试运行应用程序时,它给出了错误消息,表明问题是 java 版本,然后我安装了所需的 java 版本,但不幸的是它没有解决问题,因为现在它没有显示错误消息也不运行!!
回答by Gangnus
Go to Eclipse dir
转到 Eclipse 目录
Edit eclipse.ini
编辑 eclipse.ini
Edit or add -vm option:
编辑或添加 -vm 选项:
-vm
C:\Program Files\Java\jdk1.8.0_65\bin\javaw.exe
Of course, you should write reference to your javaw.exe file.
当然,您应该编写对 javaw.exe 文件的引用。
Set JAVA_HOME in eclipse-windows-preferences-java to the correct sdk folder
将 eclipse-windows-preferences-java 中的 JAVA_HOME 设置为正确的 sdk 文件夹
After that, your new java will not fit java in workspace. Create a new workspace, restart Eclipse and import your projects there. You can work.
之后,您的新 java 将不适合工作区中的 java。创建一个新工作区,重新启动 Eclipse 并在那里导入您的项目。你可以工作。
回答by kalyan vedagiri
You need to update jdk in your system if it is not latest version. Open java configuration from start and check if there is any latest update. (It will pop up a window asking to uninstall older versions. Click Next and proceed)
如果不是最新版本,则需要更新系统中的 jdk。从头打开 java 配置并检查是否有任何最新更新。(它会弹出一个窗口,要求卸载旧版本。点击下一步并继续)
After updating set JAVA_HOME, Path environmental variables. Restart the system.
更新后设置JAVA_HOME、Path环境变量。重新启动系统。
It should work now!
它现在应该可以工作了!
回答by Wilson
Mostly, this problem can be solved by tweaking the values in eclipse.ini
file located inside the Eclipse directory.
大多数情况下,这个问题可以通过调整eclipse.ini
位于 Eclipse 目录内的文件中的值来解决。
Just head over to the eclipse.ini
file, open it and make the following changes. Be sure to attempt launching the eclipse.exe
after each of the changes, as one or more may correct the error.
1. point the -vm
to the javaw.exe
in your JDK intallation as below.
只需转到eclipse.ini
文件,打开它并进行以下更改。请务必eclipse.exe
在每次更改后尝试启动,因为一个或多个更改可能会更正错误。
1.点-vm
到javaw.exe
你的JDK安装纸如下。
-vm
C:\Program Files\Java\jdk1.8.0_144\bin\javaw.exe
2.Check if the jdk version specified in the eclipse.ini
file is the correct jdk that is installed in your machine. To check this, head over to the command prompt and type
2.检查eclipse.ini
文件中指定的jdk版本是否是你机器上安装的正确jdk。要检查这一点,请转到命令提示符并键入
java -version
After checking your jdk version, ensure that it properly updated in the eclipse.ini
file. if your are running jdk 1.8.+, use the line below, if it's jdk 1.7.+ or below, chanage the 1.8
in the line below to the appriate version.
检查您的 jdk 版本后,确保它在eclipse.ini
文件中正确更新。如果您运行的是 jdk 1.8.+,请使用下面的行,如果它是 jdk 1.7.+ 或更低1.8
版本,请将下面行中的更改为适当的版本。
-Dosgi.requiredJavaVersion=1.8
Find the line
-Xmx256m
(or-Xmx1024m
). Now change the default value256m
(or1024m
) to512m
as below .-Xmx512m
找到该行
-Xmx256m
(或-Xmx1024m
)。现在将默认值256m
(或1024m
)更改512m
为如下所示。-Xmx512m
回答by Dinoval
Some computers do not have a JDK installed, which is needed to run Eclipse. You need to install a JDK in order for Eclipse to work.
有些计算机没有安装运行 Eclipse 所需的 JDK。您需要安装 JDK 才能让 Eclipse 工作。
The Oracle website has downloads for JDKs. Below, I've linked the newest one (as of typing) that should redirect automatically to any newer versions. https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Oracle 网站提供了 JDK 的下载。下面,我已经链接了应该自动重定向到任何较新版本的最新版本(打字时)。 https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html