Eclipse was running fine yesterday (and has been since I installed it about a year ago). Now all the sudden I'm getting the following error on startup:
Eclipse昨天运行良好(大约一年前我安装了Eclipse)。突然之间,我在启动时出现了以下错误:
"A Java Runtime 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 locations:
C:\Program Files\eclipse\jre\bin\javaw.exe
javaw.exe in your current PATH"
I have not changed anyhing Eclipse/Java related on my machine but a Windows update was applied to my machine yesterday, so maybe that has something to do with it (but I don't see anything that would affect Java). I've looked at all the other posts about adding something to your PATH or adding the -vm option to the Eclipse ini (couldn't get this to work) or copying the jre folder to eclipse\jre (this worked but doesn't seem like a good long term solution). So I'm really trying to figure out how to get things back to the "default" setup without messing stuff up.
我没有在我的机器上修改任何与Eclipse/Java相关的东西,但是昨天我的机器上应用了Windows更新,所以这可能与它有关(但我没有看到任何会影响Java的东西)。我查看了所有其他关于在您的路径中添加一些东西的文章,或者将-vm选项添加到Eclipse ini(无法工作)或将jre文件夹复制到Eclipse \jre(这很有用,但看起来不像是一个很好的长期解决方案)。所以我真的想知道如何让事情回到“默认”的设置而不把事情弄得一团糟。
I'm running Windows 7, Eclipse Helios and Java 1.6.0_26.
我正在运行Windows 7, Eclipse Helios和Java 1.6.0_26。
20 个解决方案
#1
143
Two ways to work around this .
有两种方法可以解决这个问题。
-
Recommended way : In your
eclipse.ini
file make sure you are pointing -vm to your jdk installation. More on this here .推荐方式:在您的eclipse中。ini文件确保您将-vm指向您的jdk安装。更多内容在这里。
-
Pass in the
vm
flag from command line. http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Find_the_JVM从命令行传入vm标志。http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F Find_the_JVM
Note : Eclipse DOES NOT consult the JAVA_HOME environment variable.
注意:Eclipse没有查询JAVA_HOME环境变量。
#2
15
Make sure both the Java version and Eclipse are belongs to same architecture.So install 64 bit java for 64 bit eclipse.
确保Java版本和Eclipse都属于相同的体系结构。因此,64位eclipse安装64位java。
#3
9
In my case i had few things missing. I didnt install JDK and JRE of 64 bit while eclipse was of 64 bit version. Once done and JDK\bin path was set in PATH variable eclipse worked fine :)
在我的案例中,我少了一些东西。我没有安装JDK和JRE 64位,而eclipse是64位版本。完成后,在path变量eclipse中设置了JDK\bin路径,效果很好:)
#4
9
eclipse.ini:
eclipse.ini:
--launcher.defaultAction
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize<br/>
256m
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll<br/>
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7
That worked for me. It doesnt have to be on the beginning, but surely it cant be on the end of the file.
为我工作。这并不一定要开始,但肯定不能在文件的末尾。
#5
5
Open eclipse.ini
file besides eclipse.exe
打开eclipse。ini文件除了eclipse.exe
paste
粘贴
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll
//find it if you are having another JDK version.
on first line. And you are good to go.
在第一行。你也很好。
#6
2
I had the same problem. I my case it was a program i've install that had destroyed the PATH env variable.
我遇到了同样的问题。我的例子是我安装的程序破坏了路径env变量。
so check your PATH environment variable.
请检查PATH环境变量。
#7
2
I had same problem after updating java. Then I paste
在更新java之后,我遇到了同样的问题。然后我粘贴
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
to show the path of javaw.exe
in eclipse.ini
file.
显示javaw的路径。exe在eclipse中。ini文件。
Hope this will help you.
希望这对你有帮助。
#8
1
First
第一个
check if you have both java 32 and 64 bit install then
检查是否有java 32和64位安装。
Setting Path on Windows
设置Windows上的路径
Windows 8
Windows 8
Drag the Mouse pointer to the Right bottom corner of the screen
拖动鼠标指针到屏幕右下角。
Click on the Search icon and type: Control Panel
点击搜索图标和类型:控制面板。
Click on -> Control Panel -> System -> Advanced
点击->控制面板>系统->先进。
Click on Environment Variables, under System Variables, find PATH, and click on it.
点击环境变量,在系统变量下,找到路径,然后点击它。
In the Edit windows, modify PATH by adding the location of the class to the value for PATH, Or simply make sure that the variable name is in ALL CAPS
在“编辑窗口”中,通过将类的位置添加到路径的值,或者只是确保变量名在所有大写中,修改路径。
If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
如果您没有项目路径,您可以选择添加一个新的变量,并添加路径作为名称和类的位置作为值。
Close the window.
关闭窗口。
Reopen Command prompt window, and run your java code.
重新打开命令提示窗口,并运行java代码。
#9
1
Via Puppet ATG installation Centos.
通过木偶ATG安装Centos。
ERROR:
错误:
No Java virtual machine could be found from your PATH
从您的路径中无法找到Java虚拟机。
SOLUTION:
解决方案:
Declear variable :
宣布变量:
$java_home="/opt/oracle/product/java/jdk1.8.0_45/bin"
$ java_home = " / opt / oracle /产品/ java / jdk1.8.0_45 / bin”
Add This "{$java_home}" Java Exec
添加这个“{$java_home}”Java Exec。
require common, java
Exec {
path => [ "${java_home}", "/usr/bin", "/bin", "/usr/sbin", "${temp_directory}"]
}
#10
0
Have you tried turning your computer off and on again. Solves 70% of my Eclipse problems
你试过关掉你的电脑吗?解决了我的70%的Eclipse问题。
#11
0
Try downloading and installing 32-bit version of Java, and then setting the path :)
尝试下载和安装32位版本的Java,然后设置路径:)
#12
0
Yeah it happend to me right now. Go to Oracle site, and search for Java SDK. Make sure you use the same architeture (x86, x64) of Eclipse.
是啊,我现在很开心。转到Oracle站点,搜索Java SDK。确保您使用的是Eclipse的相同架构(x86, x64)。
#13
0
This happened to me also. And I found the javaw.exe in C:\Windows\System32 got deleted after the windows update. Copied one more time and Eclipse started all fine.
这也发生在我身上。我找到了javaw。exe在C:\Windows\System32 windows更新后删除。再复制一次,Eclipse就开始了。
#14
0
Chek os,eclipse,and java whether it is 32 or 64 bit
Chek os、eclipse和java,不管是32还是64位。
#15
0
you can also copy your JRE folder to eclipse directory and it will work corectly
您还可以将JRE文件夹复制到eclipse目录,并且它将会很好地工作。
#16
0
The problem occurred on my machine due to Java version got updated(66 from 60). Pay special attention to it. As said above would like to add
由于Java版本的更新,我的机器出现了问题(从60更新到66)。要特别注意它。如上所述,我想补充一点。
In this file eclipse.ini, which is available where you have installed eclipse search for the line below -vm example C:\Program Files\Java\jre1.8.0_66\bin
在这个文件的eclipse。ini,在您已经安装了eclipse搜索的地方,您可以在下面的-vm示例中找到下面的代码。
now try to open this location, in case you are not able to open, that means there is some problem. In my case the version installed was jre1.8.0_60 . So there was a small difference which may not noticeable(66 instead of 60). Update it you will be able to open.
现在试着打开这个位置,以防你不能打开,这意味着有一些问题。在我的例子中,安装的版本是jre1.8.0_60。因此,有一个细微的差别可能不会被注意到(66代替60)。更新它你将能够打开。
#17
0
I came across same issue y'day, with PATH etc configured correctly. It can be opened from command line, just now working by a double click.
我遇到了同样的问题y'day,路径等配置正确。它可以从命令行打开,现在只需双击。
And it was working now, by just "Run as administrator" :)
它现在正在运行,只是“以管理员的身份运行”:)
#18
0
Some time this happens when your Java folder get updated.
当您的Java文件夹被更新时,就会出现这种情况。
Open Eclipse folder and search file eclipse.ini. Open the eclipse.ini file and check whether jre version is same as jre available in your java folder.
打开Eclipse文件夹和搜索文件eclipse.ini。打开eclipse。ini文件并检查jre版本是否与java文件夹中的jre相同。
I faced same problem when my jre got changed from jre1.8.0_101 to jre1.8.0_111.
当jre从jre1.8.0_101更改为jre1.8.0_111时,我也遇到了同样的问题。
C:\Program Files\Java\jre1.8.0_101\bin to C:\Program Files\Java\jre1.8.0_111\bin
c:) java\ jre1.8.0_101\bin到c:java\ jre1.8.0_111\bin。
#19
0
In my case the problem was that the path was enclosed in quotation marks ("):
在我的例子中,问题是路径是用引号括起来的("):
-vm
"C:\Program Files\Java\jdk1.8.0_25\bin"
Removing them fixed the problem:
消除他们的问题:
-vm
C:\Program Files\Java\jdk1.8.0_25\bin
#20
0
My solution is Include JDK's "bin" Directory in the PATH
我的解决方案是在路径中包含JDK的“bin”目录。
To edit the PATH
environment variable in Windows 7/8/10:
在Windows 7/8/10中编辑PATH环境变量:
- Launch "Control Panel" ⇒ (Optional) System and Security ⇒ System ⇒ Click "Advanced system settings" on the left pane.
- 启动“控制面板”(可选)系统和安全系统,点击左侧面板上的“高级系统设置”。
- Switch to "Advanced" tab ⇒ Push "Environment Variables" button. Under "System Variables" (the bottom pane), scroll down to select "Path" ⇒ Click "Edit...".
- 切换到“高级”标签,按下“环境变量”按钮。在“系统变量”(底部窗格),向下滚动选择“路径”⇒单击“编辑……”。
- Copy the JDK bin directory from JAVA folder and paste to "Edit..."
- 将JDK bin目录从JAVA文件夹复制到“编辑…”
#1
143
Two ways to work around this .
有两种方法可以解决这个问题。
-
Recommended way : In your
eclipse.ini
file make sure you are pointing -vm to your jdk installation. More on this here .推荐方式:在您的eclipse中。ini文件确保您将-vm指向您的jdk安装。更多内容在这里。
-
Pass in the
vm
flag from command line. http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F#Find_the_JVM从命令行传入vm标志。http://wiki.eclipse.org/FAQ_How_do_I_run_Eclipse%3F Find_the_JVM
Note : Eclipse DOES NOT consult the JAVA_HOME environment variable.
注意:Eclipse没有查询JAVA_HOME环境变量。
#2
15
Make sure both the Java version and Eclipse are belongs to same architecture.So install 64 bit java for 64 bit eclipse.
确保Java版本和Eclipse都属于相同的体系结构。因此,64位eclipse安装64位java。
#3
9
In my case i had few things missing. I didnt install JDK and JRE of 64 bit while eclipse was of 64 bit version. Once done and JDK\bin path was set in PATH variable eclipse worked fine :)
在我的案例中,我少了一些东西。我没有安装JDK和JRE 64位,而eclipse是64位版本。完成后,在path变量eclipse中设置了JDK\bin路径,效果很好:)
#4
9
eclipse.ini:
eclipse.ini:
--launcher.defaultAction
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize<br/>
256m
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll<br/>
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7
That worked for me. It doesnt have to be on the beginning, but surely it cant be on the end of the file.
为我工作。这并不一定要开始,但肯定不能在文件的末尾。
#5
5
Open eclipse.ini
file besides eclipse.exe
打开eclipse。ini文件除了eclipse.exe
paste
粘贴
-vm
C:\Program Files\Java\jdk1.7.0_21\jre\bin\server\jvm.dll
//find it if you are having another JDK version.
on first line. And you are good to go.
在第一行。你也很好。
#6
2
I had the same problem. I my case it was a program i've install that had destroyed the PATH env variable.
我遇到了同样的问题。我的例子是我安装的程序破坏了路径env变量。
so check your PATH environment variable.
请检查PATH环境变量。
#7
2
I had same problem after updating java. Then I paste
在更新java之后,我遇到了同样的问题。然后我粘贴
-vm
C:\Program Files\Java\jre6\bin\javaw.exe
to show the path of javaw.exe
in eclipse.ini
file.
显示javaw的路径。exe在eclipse中。ini文件。
Hope this will help you.
希望这对你有帮助。
#8
1
First
第一个
check if you have both java 32 and 64 bit install then
检查是否有java 32和64位安装。
Setting Path on Windows
设置Windows上的路径
Windows 8
Windows 8
Drag the Mouse pointer to the Right bottom corner of the screen
拖动鼠标指针到屏幕右下角。
Click on the Search icon and type: Control Panel
点击搜索图标和类型:控制面板。
Click on -> Control Panel -> System -> Advanced
点击->控制面板>系统->先进。
Click on Environment Variables, under System Variables, find PATH, and click on it.
点击环境变量,在系统变量下,找到路径,然后点击它。
In the Edit windows, modify PATH by adding the location of the class to the value for PATH, Or simply make sure that the variable name is in ALL CAPS
在“编辑窗口”中,通过将类的位置添加到路径的值,或者只是确保变量名在所有大写中,修改路径。
If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value.
如果您没有项目路径,您可以选择添加一个新的变量,并添加路径作为名称和类的位置作为值。
Close the window.
关闭窗口。
Reopen Command prompt window, and run your java code.
重新打开命令提示窗口,并运行java代码。
#9
1
Via Puppet ATG installation Centos.
通过木偶ATG安装Centos。
ERROR:
错误:
No Java virtual machine could be found from your PATH
从您的路径中无法找到Java虚拟机。
SOLUTION:
解决方案:
Declear variable :
宣布变量:
$java_home="/opt/oracle/product/java/jdk1.8.0_45/bin"
$ java_home = " / opt / oracle /产品/ java / jdk1.8.0_45 / bin”
Add This "{$java_home}" Java Exec
添加这个“{$java_home}”Java Exec。
require common, java
Exec {
path => [ "${java_home}", "/usr/bin", "/bin", "/usr/sbin", "${temp_directory}"]
}
#10
0
Have you tried turning your computer off and on again. Solves 70% of my Eclipse problems
你试过关掉你的电脑吗?解决了我的70%的Eclipse问题。
#11
0
Try downloading and installing 32-bit version of Java, and then setting the path :)
尝试下载和安装32位版本的Java,然后设置路径:)
#12
0
Yeah it happend to me right now. Go to Oracle site, and search for Java SDK. Make sure you use the same architeture (x86, x64) of Eclipse.
是啊,我现在很开心。转到Oracle站点,搜索Java SDK。确保您使用的是Eclipse的相同架构(x86, x64)。
#13
0
This happened to me also. And I found the javaw.exe in C:\Windows\System32 got deleted after the windows update. Copied one more time and Eclipse started all fine.
这也发生在我身上。我找到了javaw。exe在C:\Windows\System32 windows更新后删除。再复制一次,Eclipse就开始了。
#14
0
Chek os,eclipse,and java whether it is 32 or 64 bit
Chek os、eclipse和java,不管是32还是64位。
#15
0
you can also copy your JRE folder to eclipse directory and it will work corectly
您还可以将JRE文件夹复制到eclipse目录,并且它将会很好地工作。
#16
0
The problem occurred on my machine due to Java version got updated(66 from 60). Pay special attention to it. As said above would like to add
由于Java版本的更新,我的机器出现了问题(从60更新到66)。要特别注意它。如上所述,我想补充一点。
In this file eclipse.ini, which is available where you have installed eclipse search for the line below -vm example C:\Program Files\Java\jre1.8.0_66\bin
在这个文件的eclipse。ini,在您已经安装了eclipse搜索的地方,您可以在下面的-vm示例中找到下面的代码。
now try to open this location, in case you are not able to open, that means there is some problem. In my case the version installed was jre1.8.0_60 . So there was a small difference which may not noticeable(66 instead of 60). Update it you will be able to open.
现在试着打开这个位置,以防你不能打开,这意味着有一些问题。在我的例子中,安装的版本是jre1.8.0_60。因此,有一个细微的差别可能不会被注意到(66代替60)。更新它你将能够打开。
#17
0
I came across same issue y'day, with PATH etc configured correctly. It can be opened from command line, just now working by a double click.
我遇到了同样的问题y'day,路径等配置正确。它可以从命令行打开,现在只需双击。
And it was working now, by just "Run as administrator" :)
它现在正在运行,只是“以管理员的身份运行”:)
#18
0
Some time this happens when your Java folder get updated.
当您的Java文件夹被更新时,就会出现这种情况。
Open Eclipse folder and search file eclipse.ini. Open the eclipse.ini file and check whether jre version is same as jre available in your java folder.
打开Eclipse文件夹和搜索文件eclipse.ini。打开eclipse。ini文件并检查jre版本是否与java文件夹中的jre相同。
I faced same problem when my jre got changed from jre1.8.0_101 to jre1.8.0_111.
当jre从jre1.8.0_101更改为jre1.8.0_111时,我也遇到了同样的问题。
C:\Program Files\Java\jre1.8.0_101\bin to C:\Program Files\Java\jre1.8.0_111\bin
c:) java\ jre1.8.0_101\bin到c:java\ jre1.8.0_111\bin。
#19
0
In my case the problem was that the path was enclosed in quotation marks ("):
在我的例子中,问题是路径是用引号括起来的("):
-vm
"C:\Program Files\Java\jdk1.8.0_25\bin"
Removing them fixed the problem:
消除他们的问题:
-vm
C:\Program Files\Java\jdk1.8.0_25\bin
#20
0
My solution is Include JDK's "bin" Directory in the PATH
我的解决方案是在路径中包含JDK的“bin”目录。
To edit the PATH
environment variable in Windows 7/8/10:
在Windows 7/8/10中编辑PATH环境变量:
- Launch "Control Panel" ⇒ (Optional) System and Security ⇒ System ⇒ Click "Advanced system settings" on the left pane.
- 启动“控制面板”(可选)系统和安全系统,点击左侧面板上的“高级系统设置”。
- Switch to "Advanced" tab ⇒ Push "Environment Variables" button. Under "System Variables" (the bottom pane), scroll down to select "Path" ⇒ Click "Edit...".
- 切换到“高级”标签,按下“环境变量”按钮。在“系统变量”(底部窗格),向下滚动选择“路径”⇒单击“编辑……”。
- Copy the JDK bin directory from JAVA folder and paste to "Edit..."
- 将JDK bin目录从JAVA文件夹复制到“编辑…”