英文:
Run jps on command promt
问题
我安装了Hadoop并尝试运行它。终端显示所有内容都已启动,但当我运行jps命令时,显示:
'jps'不被识别为内部或外部命令,
可执行的程序或批处理文件。
我设置了JAVA_HOME=C:\Progra~1\Java\jre1.8.0_261,以及path=C:\Progra~1\Java\jre1.8.0_261\bin和C:\Program~1\Java\jre1.8.0_261\legal\jdk在环境变量中,但当我在命令提示符中键入jps时,显示:不被识别为内部或外部命令。
我不知道该怎么办,请帮帮我。
英文:
I installed Hadoop and tried to run it. The terminal shows that everything has been started but when I run jps command it shows :
'jps' is not recognized as an internal or external command,
operable program or batch file.
I set JAVA_HOME= C:\Progra~1\Java\jre1.8.0_261 and path = C:\Progra~1\Java\jre1.8.0_261\bin and C:\Program~1\Java\jre1.8.0_261\legal\jdk in enviroment, but when I type jps in command prompt it shows : Not recognized as an internal or external command.
I don't know what can I do, Help me, please.
答案1
得分: 0
看起来在您指定的系统环境变量的 bin 目录中找不到 jps 可执行文件。如果您在系统中安装了 jdk1.8.0_26,并且它位于 C:\Program Files 目录中,那么它应该位于 C:\Program Files\Java\jdk1.8.0_261\bin 内。尝试像这样指定 JAVA_HOME:
- 前往
控制面板 -> 系统 -> 高级系统设置 -> 环境变量。 - 添加一个名为
JAVA_HOME的新路径变量:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_261 - 从
系统变量中选择Path,然后点击编辑。 - 删除现有的 Java 路径,将新路径添加为
%JAVA_HOME%\bin。 - 现在,打开命令窗口,输入
jps,然后按ENTER键。
注意:您可以从 此处 下载 JDK。
英文:
It looks like the jps executable is no present in the bin directory that you've specified in system environment variable. It should be inside C:\Program Files\Java\jdk1.8.0_261\bin if you have jdk1.8.0_26 installed in your system in the location C:\Program Files. Try specifying the JAVA_HOME like this:
- Go to
Control Panel -> System -> Advanced System Settings ->.
Environment Variables - Add a new path variable called
JAVA_HOME:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_261 - Select
PathfromSystem Variablesand clickEdit. - Remove the existing Java path and add the new path as
%JAVA_HOME%\bin - Now, open command window, type
jpsand hitENTER.
> Note: You can download JDK from here
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。


评论