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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 记一次.NET内存居高不下排查解决与启示