以前傻乎乎的,每次安装什么软件都是下载个windows安装文件,然后双击完exe文件就是一个劲儿的点下一步。知道完成,就心满意足的去使用了,后来发现机子卡了,垃圾多了,有些软件明明自己貌似没点安装竟然也有。当时觉得好神奇,现在才发现,那都是自己的问题。好了废话不多说了,接下来说下在本机没有安装JDK的情况下eclipse启动时报的错误及解决办法。 eclipse(下载链接:[eclipse](http://pan.baidu.com/s/1mgu0COw)刚刚下载之后如果没有安装JDK和配置环境变量的话,会报这样的错误:
orintorunafterthe following locations:E:\Program Files(x86)\eclipse3.7.2in your current PATH
As shown in the following:
It means:
The Java Runtime Environment (JRE) or Java Development Kit (JDK) must be able to support running eclipse, and no Java Virtual machine was found after searching for the following path: Files (x86) \eclipse3.7.2\jre\bin\ Javaw.exe and Windows environment variables in path.
so there are three ways to solve this problem.
1.
To download a JDK online, here is a jdk7 version of the Unzip package link jdk1.7.0_06, and then under the decompression path of eclipse (for example my is here: E:\Program
Files (x86) \eclipse3.7.2) after extracting the JDK tarball, there is a JRE folder (not a jre7) folder under the Jdk1.7.0_06 folder, and then it is OK to copy to Eclipse's decompression path.
2.
As mentioned in 1 above, after the JDK download decompression, there is a Eclipse.ini file under the decompression path of Eclipse, which is the configuration file for parameters such as the initialization environment at eclipse startup.
After opening
Add the following openfile:
-vm
E:/programs/java/jdk1.6.0_45/bin
The complete content is as follows
`
-Startupplugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar--launcher.libraryplugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502-Productorg.eclipse.epp.package.jee.product--launcher.defaultactionopenfile--launcher. xxmaxpermsize 256m-Showsplashorg.eclipse.platform--launcher. xxmaxpermsize 256m--launcher.defaultactionopenfile-VMSe:/programs/java/jdk1.6.0_45/bin-Vmargs- dosgi. requiredjavaversion=1.5 -xms40m-xmx512m- dfile. encoding=UTF-8
3.
第三种方法我就不多说了,下载个jdk安装包或者压缩包,然后在Windows环境变量里配置好了就行了,只要eclipse能在PATH路径下找到javaw.exe就oK了,你也可以在配置完成后在cmd中输入java -version来测试配置是否正确。
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Problems and solutions of JDK environment variables at eclipse startup