问题描述
我正在尝试启动.bat文件,但是我收到了错误
I am trying to launch a .bat file but I get the error
系统无法找到文件C:\ProgramData \Oracle \ Java. javapath \ _java.exe
System cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe
我知道这可能是一个路径变量,但我无法理解如何解决它,如果这是问题。
I understand that this is probably a path variable, but I have not been able to understand how to fix it, if that is the problem.
提前致谢。
推荐答案
首先,路径您提供的是 C:\ProgramData \Oracle \ Java \ javaapath \ _java.exe
似乎不正确。它应该指向你(可能)在这里的JRE或JDK文件夹:
First of all, the path that you provided i.e. C:\ProgramData\Oracle\Java\javapath\java.exe
doesn't appear to be correct. It should point to either JRE or JDK folder that you (probably) have in here:
C:\Program Files (x86)\Java\jdk1.8.0_25\bin
在那里你至少应该看到以下文件(因此,将此bin目录添加到env vars中的PATH变量):
In there you should at least see the following files (and hence, the addition of this bin directory to your PATH variable in the env vars):
java.exe
javac.exe
javac.exe
javaw.exe
javaw.exe
javap.exe
javap.exe
java.h.exe
java.h.exe
java-rmi.exe
java-rmi.exe
javadoc .exe
javadoc.exe
jarsigner.exe
jarsigner.exe
jar.exe
如果你没有看到上面的文件,那肯定是错的!此外,即使你使用JRE(不是JDK),你仍然应该有这个bin文件夹,java.exe所在的位置。
If you don't see the files above, something is definitely wrong! Also, even if you were using JRE (not JDK), you should still have this bin folder present, where java.exe resides.
这篇关于找不到java.exe的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!