关于javac is not recognized as an internal or external command, operable program or batch file的解决方案

1.将这句话翻译过来,可以使用百度翻译复制粘贴,也可以自译

javac is not recognized as an internal or external command, operable program or batch file
javac不能被识别为内部或外部命令、可操作程序

##可以看出这是java环境变量配置问题

2.平时我们安装jdk后都要win+r进入cmd界面后输入命令java -version返回java home当前路径

这里13.0.2是指的我们jdk的版本号

我们在这里加一个javac -version 然后就会出现我们今天讨论的问题---Javac不能找到: javac is not recognized as an internal or external command, operable program or batch file

这时候我们需要检查两个方面:

一是到环境变量中,先看系统环境变量叫做“JAVA_HOME”的是否配置为最新的JDK,不可以指向JRE哦!

二是到环境变量中,检查“PATH”是否配置正确。

这两步是环境变量设置基本步骤,我前面提出过一个教程,按照教程一步步来就行
https://www.cnblogs.com/husiyu/p/12394171.html

PS:

  1. 配置“JAVA_HOME”时注意对应自己的版本号(就是你自己安装的路径)不要无脑复制
    比如C:\Program Files\Java\jdk-13.0.2(我这里的版本号是jdk-13.0.2
    2.注意PATH=%JAVA_HOME%\bin(bin目录)*这里是在本身存在的path里面添加,找到系统变量里面存在的path编辑就行

    3.添加classpath

一切完成以后让我们来 确认JAVA_HOME配置:cmd界面输入 echo %Java_Home%


请最后确认你的JAVA_HOME配置指向的是JDK,并不是JRE。

原文地址:https://www.cnblogs.com/husiyu/p/12400587.html

时间: 2024-10-20 10:55:16

关于javac is not recognized as an internal or external command, operable program or batch file的解决方案的相关文章

'msbuild' is not recognized as an internal or external command, operable program or batch file.

Came across this question on google, not sure if anyone still needs an answer here, but i got it working. To enable msbuild in Command Prompt, you simply have to add the path to the .net4 framework install on your machine to the PATH environment vari

'react-scripts' is not recognized as an internal or external command

React项目在执行npm start的时候报下面的错误: 解决办法:把项目目录中node_modules文件夹删掉,重新npm install一下,然后再执行npm start 'react-scripts' is not recognized as an internal or external command 原文地址:https://www.cnblogs.com/fuhuirong/p/10010642.html

mvn command is not recognized as an internal or external command

even though I have configured %m2_home% and %path% correctly, the command "mvn" is still not recognized. use command echo to output the system environment variables, everything is find, there is no typo issue of ";" and "\".

"Ipconfig" not recognized as an internal command

The command and response: C:\Users\Jason>ipconfig 'ipconfig' is not recognized as an internal or external command, operable program or batch file. Solution Right click My Computer > Properties Advaned System Settings Advanced tab > Environment Va

Windows命令无法运行报错:is not recognized as an internal

发现bat文件即使手动运行也无法成功,于是打开CMD验证,输入命令提示如下错误: "command" is not recognized as an internal or external command, operable program or batch file. 然后发现任何CMD命令都无法识别 原因:电脑用户环境设置有问题,到如下位置修改: 鼠标右键点击 My Computer-> Properties-> Advanced -> Environment

org.gradle.process.internal.ExecException: Process 'command 'D:\SDK\AS\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1

AGPBI: {"kind":"error","text":"No resource identifier found for attribute \u0027text_titleText\u0027 in package \u0027 包名 \u0027","sources":[{"file":"D:\\workSpace\\Android Studio\\Bank\\res

mac上运行appium提示错误Encountered internal error running command 解决办法

[debug] [iOS] App is not installed. Will try to install. [MJSONWP] Encountered internal error running command: Error: Installing /var/folders/hb/5xtrkgp16bj3rctx9kxg64t00000gn/T/2016913-9705- 1ugvtlc/Payload/Input.app failed at /Applications/Appium.a

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command ' finished with non-zero exit value 1

Error:Execution failed for task ':lenovoAlbum:processReleaseResources'. > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'Android_SDK\build-tools'' finished with non-zero exit value 1 com.

安装java和eclipse的一些注意事项

出现问题: 1. cmd命令行无法运行javac文件,错误提示: 'javac' is not recognized as an internal or external command, operable program or batch file. 2. Failed to load the JNI shared library "XXXXXXXXX\bin]server\jvm,dll" 测试环境: Operating System Win8 x64 Java jdk1.7.0_