在 bin\javaw.exe 中找不到 Java 运行时环境

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27703754/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 04:53:55  来源:igfitidea点击:

Java Runtime Environment was not found at bin\javaw.exe

javawindows-server-2008odac

提问by lavanya b

When I tried to install ODAC component in Windows Server 2008 machine, it thrown below error.

当我尝试在 Windows Server 2008 机器上安装 ODAC 组件时,它抛出以下错误。

"Java Runtime Environment was not found at bin\javaw.exe. Hence the Oracle Universal Installer cannot be run. Please visit http://www.javasoft.comand install JRE version 1.4 or higher and try again"

“在 中找不到 Java 运行时环境bin\javaw.exe。因此无法运行 Oracle Universal Installer。请访问http://www.javasoft.com并安装 JRE 1.4 或更高版本,然后重试”

I found javaw.exein C:\Program Files\Java\jre1.8.0_25\bin

javaw.exeC:\Program Files\Java\jre1.8.0_25\bin

I searched in google and added the value in PATH of Environment Variable as below

我在谷歌搜索并在环境变量的PATH中添加了如下值

C:\program Files\Java\jre1.8.0_25\bin;//not worked

C:\program Files\Java\jre1.8.0_25\bin;//没有工作

C:\progra~1\Java\jre1.8.0_25\bin;//not worked

C:\progra~1\Java\jre1.8.0_25\bin;//没有工作

Please let me know how to fix this issue.

请让我知道如何解决这个问题。

采纳答案by lavanya b

While I was copying ODAC setup file to server, it didn't copied completely. The setup file is only 30 MB in server where as the original one is 290MB. Server is not copying big size files properly. So, I downloaded the component from internet and executed the exe file. Its working fine now. Thank you all for your comments.

当我将 ODAC 安装文件复制到服务器时,它没有完全复制。安装文件在服务器中只有 30 MB,而原始文件为 290 MB。服务器未正确复制大文件。所以,我从互联网上下载了组件并执行了 exe 文件。它现在工作正常。谢谢大家的意见。

回答by Mustafa sabir

Setting JAVA_HOMEis not mandatory, you can add C:\Program Files\Java\jre1.8.0_25\binin your PATH. Make sure to add a ;before the last entry and then add your entry.

设置JAVA_HOME不是强制性的,您可以C:\Program Files\Java\jre1.8.0_25\bin在您的PATH. 确保;在最后一个条目之前添加一个,然后添加您的条目​​。

After doing that open command prompt and run command java -versionand see if you PATHis correctly configured indeed. you will see valid version info if it is. If is says is not recognized as an internal or external command, then check your PATHvariable again and see if its set properly.

执行此操作后,打开命令提示符并运行命令java -version,看看您PATH是否确实配置正确。如果是,您将看到有效的版本信息。如果 is say is not recognized as an internal or external command,则PATH再次检查您的变量并查看其设置是否正确。

回答by Ye Win

Try with below possible solution:

尝试使用以下可能的解决方案:

set JRE_LOCATION=C:\Program Files\Java\jdk1.8.0_25

OR

set JRE_LOCATION=C:\Program Files\Java\jdk1.8.0_25\bin

OR

set JRE_LOCATION= C:\Program Files\Java\jdk1.8.0_25\jre

OR

set JRE_LOCATION= C:\Program Files\Java\jre1.8.0_25


Addition:
Is something preventing the JVM from running (like anti-virus s/w, Windows (your version fell off: don't know version) prohibit running, ...). You should check, do you have administrator rights on this machine?


另外:
是什么阻止了JVM运行(例如防病毒软件,Windows(您的版本下降:不知道版本)禁止运行,......)。你应该检查一下,你在这台机器上有管理员权限吗?

回答by Raghvendra Kulkarni

Installer does not able to understand C :\Program Files\Java\ ..I mean space between "Program Files" and hence failing. Please install Java in some other directory like C:\JAVA\jre1.8.0_25 and then set JAVA_HOME and JRE_HOME It should solve the problem.

安装程序无法理解 C :\Program Files\Java\ ..我的意思是“程序文件”之间的空间,因此失败。请将Java安装在其他目录,如C:\JAVA\jre1.8.0_25,然后设置JAVA_HOME和JRE_HOME应该可以解决问题。

回答by Ruchita P

Generally, you get this error because of java installed on path "C:\Program Files\Java". I faced similar issue and solved with these steps...

通常,您收到此错误是因为 java 安装在路径“C:\Program Files\Java”上。我遇到了类似的问题并通过这些步骤解决了......

  • Simply run setup file (in my case I was trying to install oracle ODI).
  • New cmd window will open and will ask for JDK path (give your JDK path see example below).
  • 只需运行安装文件(就我而言,我试图安装 oracle ODI)。
  • 新的 cmd 窗口将打开并询问 JDK 路径(提供您的 JDK 路径,请参见下面的示例)。

enter image description here

enter image description here

  • Installation should begin.
  • 安装应该开始。