简体   繁体   English

Eclipse没有打开

[英]Eclipse is not opening

I'm new to java and eclipse. 我是java和eclipse的新手。 I even saw this type of query on this website. 我什至在此网站上看到了此类查询。 But I have applied all those methods and it was also helpful. 但是我已经应用了所有这些方法,它也很有帮助。 But when I try to open eclipse, it is not opening: This is my path for java 但是,当我尝试打开eclipse时,它没有打开:这是我使用Java的路径

C:\\Program Files (x86)\\Java\\jre6 C:\\ Program Files(x86)\\ Java \\ jre6

this is where my eclipse is 这是我的日食所在

C:\\Users\\New folder\\eclipse C:\\ Users \\ New文件夹\\ eclipse

But when I run the eclipse I'm getting an error 但是当我运行日食时,我得到了一个错误

"A java rumtime environment(JRE) or java development kit(JDK) must be available in order to run eclipse. No java virtual machine was found after searching the following location: C:\\Users\\New folder\\eclipse\\jre\\bin\\javaw.exe javaw.exe in your current path" “必须有Java rumtime环境(JRE)或Java开发工具包(JDK)才能运行eclipse。搜索以下位置后未找到Java虚拟机:C:\\ Users \\ New folder \\ eclipse \\ jre \\ bin \\您当前路径中的javaw.exe javaw.exe”

Please tell me the possible solution. 请告诉我可能的解决方案。

Thanks in advance! 提前致谢!

If you have installed jdk then Eclipse won't have any issue to start. 如果您已经安装了jdk,那么Eclipse将不会有任何问题。 I think you just have installed JRE to run java programs. 我认为您刚刚安装了JRE来运行Java程序。 You need to install JDK. 您需要安装JDK。

To check whether you have installed JDK. 检查是否已安装JDK。 Check Path C:\\Program Files (x86)\\Java . 检查路径C:\\Program Files (x86)\\Java Your Java directory should contain directory jdk1.6.. , If you don't have this directory there, search it at other places. 您的Java目录应该包含目录jdk1.6.. ,如果那里没有该目录,请在其他位置搜索它。 If you did not find directory then you didn't install JDK. 如果找不到目录,则说明您没有安装JDK。

Download JDK from here . 这里下载JDK。

You should set JAVA_HOME and JRE_HOME variable. 您应该设置JAVA_HOME和JRE_HOME变量。 http://www.javawebonline.com/java-se-programming/beginners/java_home-jre_home-environment-variables/ http://www.javawebonline.com/java-se-programming/beginners/java_home-jre_home-environment-variables/

And another suggestion is you should move your java home to another location and test your path to java such as 另一个建议是,您应该将Java主页移至另一个位置并测试您的Java路径,例如

C:\\Java\\jre6 C:\\ Java \\ jre6

instead of 代替

C:\\Program Files (x86)\\Java\\jre6. C:\\ Program Files(x86)\\ Java \\ jre6。

Go to C:\\Users\\New folder\\eclipse Open eclipse.ini file with text editor and add the javaw location there ( right after -vm part ) like so: 转到C:\\ Users \\ New folder \\ eclipse使用文本编辑器打开eclipse.ini文件,并在其中添加javaw位置(在-vm part之后),如下所示:

-vm
C:/Program Files/Java/jdk1.6.0_33/bin/javaw.exe <--- change to your path
-vmargs

Open the command prompt by pressing Windows + r , type cmd and press Enter . 通过按Windows + r打开命令提示符,键入cmd ,然后按Enter

Type javac and check the output. 输入javac并检查输出。

If it gives all the options and usage, then you have configured the PATH vairables correctly, or else you have not set them up correctly. 如果它提供了所有选项和用法,则说明您已正确配置PATH变量,否则未正确设置它们。

Try it by checking the value at the command prompt. 通过在命令提示符处检查该值来尝试。

NOTE 注意

You need to open a new command prompt each time you change the environment variables. 每次更改环境变量时,都需要打开一个新的命令提示符。

检查此链接以获取有关安装jdkjre以及如何设置环境变量的说明。

If you have two Program Files folder in your C: drive 如果您的C: drive有两个Program Files

such as

C:\Program Files

C:\Program Files (x86)

then try to put your java inside 然后尝试将您的Java放入

C:\Program Files

instead of C:\\Program Files (x86) 而不是C:\\Program Files (x86)

It seems you are running 64 bit eclipse in 64 bit operating system. 看来您正在64位操作系统中运行64位Eclipse。 If you are running 64 bit eclipse then you need 64 bit JDK. 如果您正在运行64位Eclipse,则需要64位JDK。 Please install 64 bit JDK and run eclipse. 请安装64位JDK并运行eclipse。

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

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