jps: 未找到命令

转载自:https://blog.csdn.net/prxhlirr/article/details/126704994

===========

 

问题: jps: 未找到命令
思路:
1.执行java -version发现有jdk
2.执行rpm -qa |grep -i jdk 命令查看已经安装的包,发现有jdk
3.需要安装openjdk-devel包
方案:
执行
yum list *openjdk-devel*
yum install java-1.8.0-openjdk-devel.x86_64
1
2
源代码
[root@localhost datax-web-2.1.2]# java -version
openjdk version "1.8.0_342"
OpenJDK Runtime Environment (build 1.8.0_342-b07)
OpenJDK 64-Bit Server VM (build 25.342-b07, mixed mode)
[root@localhost datax-web-2.1.2]# ls -l | grep jps
[root@localhost datax-web-2.1.2]# whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz
[root@localhost datax-web-2.1.2]# yum list *openjdk-devel*
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
可安装的软件包
java-1.6.0-openjdk-devel.x86_64 1:1.6.0.41-1.13.13.1.el7_3 base
java-1.7.0-openjdk-devel.x86_64 1:1.7.0.261-2.6.22.2.el7_8 base
java-1.8.0-openjdk-devel.i686 1:1.8.0.342.b07-1.el7_9 updates
java-1.8.0-openjdk-devel.x86_64 1:1.8.0.342.b07-1.el7_9 updates
java-11-openjdk-devel.i686 1:11.0.16.0.8-1.el7_9 updates
java-11-openjdk-devel.x86_64 1:11.0.16.0.8-1.el7_9 updates
[root@localhost datax-web-2.1.2]# yum install java-1.8.0-openjdk-devel.x86_64
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 java-1.8.0-openjdk-devel.x86_64.1.1.8.0.342.b07-1.el7_9 将被 安装
--> 解决依赖关系完成

依赖关系解决

===================================================================================================================================================================================================================
Package 架构 版本 源 大小
===================================================================================================================================================================================================================
正在安装:
java-1.8.0-openjdk-devel x86_64 1:1.8.0.342.b07-1.el7_9 updates 9.8 M

事务概要
===================================================================================================================================================================================================================
安装 1 软件包

总下载量:9.8 M
安装大小:40 M
Is this ok [y/d/N]: y
Downloading packages:
java-1.8.0-openjdk-devel-1.8.0.342.b07-1.el7_9.x86_64.rpm | 9.8 MB 00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : 1:java-1.8.0-openjdk-devel-1.8.0.342.b07-1.el7_9.x86_64 1/1
验证中 : 1:java-1.8.0-openjdk-devel-1.8.0.342.b07-1.el7_9.x86_64 1/1

已安装:
java-1.8.0-openjdk-devel.x86_64 1:1.8.0.342.b07-1.el7_9

完毕!
[root@localhost datax-web-2.1.2]# ls -l | grep jps
[root@localhost datax-web-2.1.2]# jps
10866 DataXAdminApplication
11538 Jps

posted @ 2022-11-05 21:20  larybird  阅读(1273)  评论(0编辑  收藏  举报