I have researched this and none of the solutions that I have seen have fixed my error.
我已经研究过这个问题,我所看到的解决方案中没有一个修正了我的错误。
What is happening is I tried to install Java EE version got the above error and then found out that I must install Java SE first. So I installed Java SE and set the JAVA_HOME variable to C:\Program Files\Java\jdk1.8.0 which is where I installed my JDK. I also put C:\Program Files\Java\jdk1.8.0\bin in my PATH variable. Still not working. I also tried the JAVA_HOME variable with C:\Program Files\Java\jdk1.8.0\bin and that didn't work. I also tried installing without the PATH variable being updated to where I put my JDK.
正在发生的是,我试图安装Java EE版本得到上述错误,然后发现我必须首先安装Java SE。所以我安装了Java SE和设置JAVA_HOME变量C:\Program Files\Java\jdk1.8.0我安装JDK。我也把C:\Program Files\Java\jdk1.8.0\bin PATH变量。仍然不工作。我也试着用C:\Program Files\Java\jdk1.8.0\bin JAVA_HOME变量和不工作。我还尝试了安装,但没有将PATH变量更新到JDK的位置。
I'm really getting confused as to why this is happening. I've had Java before and I don't recall having this much trouble installing it.
我真搞不懂为什么会这样。我以前有过Java,我不记得有这么多麻烦安装它。
PS I don't install from the command line I just click the download icon in Firefox and then click the download.
PS我没有从命令行安装,我只是点击Firefox中的下载图标,然后点击下载。
7 个解决方案
#1
1
Uninstall everything, all of it.
把所有的东西都卸载掉。
Then go to your Program Files folder (and (x86) folder if on a 64bit Windows) and physically remove any Java folders.
然后进入你的程序文件文件夹(和(x86)文件夹,如果是在64位的Windows上),物理上删除任何Java文件夹。
Reinstall Java SE and then the EE packages. Sometimes Windows appears to get a bit confused and you need to help it figure out what to do.
重新安装Java SE,然后重新安装EE包。有时Windows似乎有点混乱,你需要帮助它弄清楚该怎么做。
#2
38
Try running the installer at your commandline and pass the path of the JRE instead of the JDK.
尝试在命令行运行安装程序,并传递JRE而不是JDK的路径。
For Example:
例如:
java_ee_sdk7-windows.exe -j "C:\Program Files\Java\jre8"
#3
4
I had the exact same problem and even downloading the version without JDK didn't help! I simply installed it from the terminal with passing the JRE For Example:
我也遇到了同样的问题,甚至下载没有JDK的版本也无济于事!我只是从终端安装它,并传递JRE,例如:
java_ee_sdk7-windows.exe -j "C:\Program Files\Java\jre7"
java_ee_sdk7-windows。exe - j“C:\ Program Files \ Java \ jre7”
and it worked like a charm!
它就像一种魅力!
#4
2
I had the same problem but an additional step was required in order to install using the command line. In the command window (on my Windows 10 laptop) I had to use:
我也遇到了同样的问题,但是为了使用命令行进行安装,需要额外的步骤。在命令窗口(在我的Windows 10笔记本电脑上)我必须使用:
cmd /d
to tell the cmd window to ignore registry AutoRun commands before the java installation executable would run. After using cmd /d, and changing to the directory where the .exe file was at, the following worked:
告诉cmd窗口在java安装可执行文件运行之前忽略registry AutoRun命令。在使用cmd /d后,并切换到.exe文件所在的目录,以下工作如下:
java_ee_sdk-6u4-jdk7-windows-x64.exe -j "%JAVA_HOME%"
Where JAVA_HOME is a system environment variable pointing to an existing JDK installation (C:\Program Files\Java\jdk1.8.0_65).
其中JAVA_HOME是指向现有JDK安装的系统环境变量(C:\程序文件\Java\jdk1.8.0_65)。
#5
0
If you want to uninstall, go to the glassfish folder and open the command prompt, then type:
如果要卸载,请转到glassfish文件夹并打开命令提示符,然后输入:
uninstall.exe -j <The path to your JRE>
#6
-1
This was happening to me when I tried to run the Java EE installer. What I did, was to download from Oracle a Java EE version which didn't include the JDK, because it was already installed in my system. Problem solved!
当我尝试运行Java EE安装程序时,就发生了这种情况。我所做的就是从Oracle下载一个Java EE版本,它没有包含JDK,因为它已经安装在我的系统中了。问题解决了!
#7
-1
- Open regedit.
- 打开注册表编辑器。
- goto :HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\
- goto:HKEY_LOCAL_MACHINE \ Software \ JavaSoft \ \ Java运行时环境
- set CurrentVersion to desired JDK version.
- 将当前版本设置为所需的JDK版本。
- Check JavaHome and RuntimeLib path's for selected jdk version folder
- 检查JavaHome和RuntimeLib路径中选择的jdk版本文件夹
Check JavaHome and RuntimeLib path's for selected jdk version folder example: "HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.7".
检查JavaHome和RuntimeLib路径的选择jdk版本文件夹示例:“HKEY_LOCAL_MACHINE\软件\JavaSoft\Java运行时环境\1.7”。
example:
例子:
- JavaHome=C:\Program Files (x86)\Java\jdk1.7.0_79
- JavaHome = C:\ Program Files \ Java \ jdk1.7.0_79(x86)
- RuntimeLib=C:\Program Files (x86)\Java\jdk1.7.0_79\jre\bin\server\jvm.dll
- RuntimeLib = C:\ Program Files \ Java \(x86)jdk1.7.0_79 \ jre \ bin \ server \ jvm.dll
来源:http://tech-read.com/2009/05/19/how-to-solve-error-could-not-find-java-runtime-2-environment-while-opening-an-ide/
#1
1
Uninstall everything, all of it.
把所有的东西都卸载掉。
Then go to your Program Files folder (and (x86) folder if on a 64bit Windows) and physically remove any Java folders.
然后进入你的程序文件文件夹(和(x86)文件夹,如果是在64位的Windows上),物理上删除任何Java文件夹。
Reinstall Java SE and then the EE packages. Sometimes Windows appears to get a bit confused and you need to help it figure out what to do.
重新安装Java SE,然后重新安装EE包。有时Windows似乎有点混乱,你需要帮助它弄清楚该怎么做。
#2
38
Try running the installer at your commandline and pass the path of the JRE instead of the JDK.
尝试在命令行运行安装程序,并传递JRE而不是JDK的路径。
For Example:
例如:
java_ee_sdk7-windows.exe -j "C:\Program Files\Java\jre8"
#3
4
I had the exact same problem and even downloading the version without JDK didn't help! I simply installed it from the terminal with passing the JRE For Example:
我也遇到了同样的问题,甚至下载没有JDK的版本也无济于事!我只是从终端安装它,并传递JRE,例如:
java_ee_sdk7-windows.exe -j "C:\Program Files\Java\jre7"
java_ee_sdk7-windows。exe - j“C:\ Program Files \ Java \ jre7”
and it worked like a charm!
它就像一种魅力!
#4
2
I had the same problem but an additional step was required in order to install using the command line. In the command window (on my Windows 10 laptop) I had to use:
我也遇到了同样的问题,但是为了使用命令行进行安装,需要额外的步骤。在命令窗口(在我的Windows 10笔记本电脑上)我必须使用:
cmd /d
to tell the cmd window to ignore registry AutoRun commands before the java installation executable would run. After using cmd /d, and changing to the directory where the .exe file was at, the following worked:
告诉cmd窗口在java安装可执行文件运行之前忽略registry AutoRun命令。在使用cmd /d后,并切换到.exe文件所在的目录,以下工作如下:
java_ee_sdk-6u4-jdk7-windows-x64.exe -j "%JAVA_HOME%"
Where JAVA_HOME is a system environment variable pointing to an existing JDK installation (C:\Program Files\Java\jdk1.8.0_65).
其中JAVA_HOME是指向现有JDK安装的系统环境变量(C:\程序文件\Java\jdk1.8.0_65)。
#5
0
If you want to uninstall, go to the glassfish folder and open the command prompt, then type:
如果要卸载,请转到glassfish文件夹并打开命令提示符,然后输入:
uninstall.exe -j <The path to your JRE>
#6
-1
This was happening to me when I tried to run the Java EE installer. What I did, was to download from Oracle a Java EE version which didn't include the JDK, because it was already installed in my system. Problem solved!
当我尝试运行Java EE安装程序时,就发生了这种情况。我所做的就是从Oracle下载一个Java EE版本,它没有包含JDK,因为它已经安装在我的系统中了。问题解决了!
#7
-1
- Open regedit.
- 打开注册表编辑器。
- goto :HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\
- goto:HKEY_LOCAL_MACHINE \ Software \ JavaSoft \ \ Java运行时环境
- set CurrentVersion to desired JDK version.
- 将当前版本设置为所需的JDK版本。
- Check JavaHome and RuntimeLib path's for selected jdk version folder
- 检查JavaHome和RuntimeLib路径中选择的jdk版本文件夹
Check JavaHome and RuntimeLib path's for selected jdk version folder example: "HKEY_LOCAL_MACHINE\Software\JavaSoft\Java Runtime Environment\1.7".
检查JavaHome和RuntimeLib路径的选择jdk版本文件夹示例:“HKEY_LOCAL_MACHINE\软件\JavaSoft\Java运行时环境\1.7”。
example:
例子:
- JavaHome=C:\Program Files (x86)\Java\jdk1.7.0_79
- JavaHome = C:\ Program Files \ Java \ jdk1.7.0_79(x86)
- RuntimeLib=C:\Program Files (x86)\Java\jdk1.7.0_79\jre\bin\server\jvm.dll
- RuntimeLib = C:\ Program Files \ Java \(x86)jdk1.7.0_79 \ jre \ bin \ server \ jvm.dll
来源:http://tech-read.com/2009/05/19/how-to-solve-error-could-not-find-java-runtime-2-environment-while-opening-an-ide/