简体   繁体   English

eclipse不能在Windows 10上运行

[英]eclipse doesn't run on windows 10

我试图在Windows 10上安装两个不同版本的Eclipse而没有任何成功,我试图安装的版本是eclipse-java-mars-R-win32-x86_64和eclipse-java-luna-SR2-win32-x86_6,in我第一次尝试运行应用程序时,它给出了错误消息,表明问题是java版本我然后安装了所需的java版本但不幸的是它没有解决问题,因为现在它没有显示错误消息也不运行!!

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. 之后,您的新java将不适合工作空间中的java。 Create a new workspace, restart Eclipse and import your projects there. 创建一个新工作区,重新启动Eclipse并在那里导入项目。 You can work. 你可以工作。

You need to update jdk in your system if it is not latest version. 如果不是最新版本,则需要在系统中更新jdk。 Open java configuration from start and check if there is any latest update. 从头开始打开java配置并检查是否有最新更新。 (It will pop up a window asking to uninstall older versions. Click Next and proceed) (它会弹出一个窗口,要求卸载旧版本。单击“下一步”继续)

After updating set JAVA_HOME, Path environmental variables. 更新后设置JAVA_HOME,Path环境变量。 Restart the system. 重启系统。

It should work now! 它现在应该工作!

Mostly, this problem can be solved by tweaking the values in eclipse.ini file located inside the Eclipse directory. 大多数情况下,可以通过调整位于Eclipse目录中的eclipse.ini文件中的值来解决此问题。

Just head over to the eclipse.ini file, open it and make the following changes. 只需转到eclipse.ini文件,打开它并进行以下更改。 Be sure to attempt launching the eclipse.exe after each of the changes, as one or more may correct the error. 请务必在每次更改后尝试启动eclipse.exe ,因为一个或多个更改可能会更正错误。

1. point the -vm to the javaw.exe in your JDK intallation as below. 1.将-vm指向JDK安装中的javaw.exe ,如下所示。

-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. 2.检查eclipse.ini文件中指定的jdk版本是否是您机器中安装的正确jdk。 To check this, head over to the command prompt and type 要检查这一点,请转到命令提示符并键入

java -version

After checking your jdk version, ensure that it properly updated in the eclipse.ini file. 检查jdk版本后,确保在eclipse.ini文件中正确更新。 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 1.8。+,请使用下面的行,如果它是jdk 1.7。+或更低,请将下面一行中的1.8转换为适用版本。

-Dosgi.requiredJavaVersion=1.8
  1. Find the line -Xmx256m (or -Xmx1024m ). 找到-Xmx256m (或-Xmx1024m )行。 Now change the default value 256m (or 1024m ) to 512m as below . 现在将默认值256m (或1024m )更改为512m ,如下所示。

    -Xmx512m

Some computers do not have a JDK installed, which is needed to run Eclipse. 某些计算机没有安装JDK,这是运行Eclipse所必需的。 You need to install a JDK in order for Eclipse to work. 您需要安装JDK才能使Eclipse正常工作。

The Oracle website has downloads for JDKs. Oracle网站提供了JDK的下载。 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 https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

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

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