无法在 Windows 上使用 jar 命令
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6229324/
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
Cannot use jar command on windows
提问by MirroredFate
The jar command is not working on my box. I have downloaded the jdk, and set the envar "Path" to include the path to the jdk \bin directory. However, I still get that annoying message, "'jar' is not recognized as an internal or external command, operable program or batch file." Does anyone have any suggestions to solve this problem?
jar 命令在我的盒子上不起作用。我已经下载了 jdk,并设置了 envar“路径”以包含 jdk \bin 目录的路径。但是,我仍然收到烦人的消息,“'jar' 不是内部或外部命令,也不是可运行的程序或批处理文件。” 有没有人有任何建议来解决这个问题?
采纳答案by Randomness
I think from the error message that you're using Windows?
我从错误消息中认为您正在使用 Windows?
If so, did you try it in a command prompt that you opened after changing your path using the GUI? And did you double check for typos in the path you added?
如果是这样,您是否在使用 GUI 更改路径后打开的命令提示符中尝试过?您是否仔细检查了您添加的路径中的拼写错误?
You can always try running "echo %PATH%" to check your path, and ensure your change is both showing up and error free
您可以随时尝试运行“echo %PATH%”来检查您的路径,并确保您的更改既显示又无错误
回答by martinusadyh
Can you paste the result of env
command ? Or please launch new command prompt, then please try again if you think you configuration is Ok.
你能粘贴env
命令的结果吗?或者请启动新的命令提示符,如果您认为您的配置没问题,请再试一次。