[英]Path not Found: The system cannot find the file C:\ProgramData\Oracle\Java\javapath\java.exe
java & java -version commands are accessible from the bin folder of JDK , but I can not access them from desktop or anywhere else, but the programs are running successfully in IDE ! java & java -version命令可从JDK的bin文件夹访问,但我无法从桌面或其他任何地方访问它们,但程序在IDE 中成功运行! What should I do?
我该怎么办?
Inside the JDK bin folder:在 JDK bin 文件夹中:
From Desktop:从桌面:
JAVA_HOME
is used by third-party tools to find java
(not by java
itself). JAVA_HOME
被第三方工具用来查找java
(不是java
本身)。 You can use that to set your PATH
, which is what is searched.您可以使用它来设置您的
PATH
,这是搜索的内容。
set "PATH=%JAVA_HOME%\bin;%PATH%"
Note that the quotes are correct in this command and moving (or removing) them will break it.请注意,此命令中的引号是正确的,移动(或删除)它们会破坏它。
"The system cannot find the file c:\\ProgramData\\Oracle\\Java\\javapath\\java.exe" “系统找不到文件 c:\\ProgramData\\Oracle\\Java\\javapath\\java.exe”
There are steps to solve the problem which are有解决问题的步骤是
Step 1: GO TO C:\\ProgramData\\Oracle\\Java\\javapath
and check for the java.exe
, javaw.exe
and javaws.exe
(You may found similar file name but with a different extension for eg .symlink)步骤 1:转到
C:\\ProgramData\\Oracle\\Java\\javapath
并检查java.exe
、 javaw.exe
和javaws.exe
(您可能会发现类似的文件名但具有不同的扩展名,例如 .symlink)
Step 2: If you found the file name with different extension and size up to 0kb then delete it permanently.第 2 步:如果您发现文件名具有不同的扩展名且大小最大为 0kb,则将其永久删除。
Step 3: GO TO C:\\Program Files\\Java\\jdk1.8.0_101\\bin
and search for those three file names which are java.exe
, javaw.exe
and javaws.exe
步骤 3:转到
C:\\Program Files\\Java\\jdk1.8.0_101\\bin
并搜索java.exe
、 javaw.exe
和javaws.exe
这三个文件名
Step 4: Copy and Paste those three files in this location C:\\ProgramData\\Oracle\\Java\\javapath
第 4 步:将这三个文件复制并粘贴到此位置
C:\\ProgramData\\Oracle\\Java\\javapath
Step 5: Close all your application related to java like your IDE or cmd & Restart PC and then try compile and run第 5 步:关闭所有与 Java 相关的应用程序,例如 IDE 或 cmd 并重新启动 PC,然后尝试编译并运行
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.