找不到jmap命令 [英] jmap command not found

查看:6038
本文介绍了找不到jmap命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 CentOS 服务器上使用 jmap 命令,但它一直告诉我该命令即使我安装了JDK,也找不到。

I'm trying to use the jmap command on my CentOS server but it keeps telling me that the command was not found even though I have the JDK installed.

这是命令的输出 java -version

java version "1.7.0_25"
OpenJDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)
OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)

如何解决此问题?

推荐答案

您应该能够在 java-1.8.0-openjdk-devel-debug jmap Redhat / Centos上的>,或 java-1.7.0-openjdk-devel-debug java-1.6.0-openjdk-devel-debug 包。要安装它,请以root身份运行以下命令:

You should be able to find jmap in the java-1.8.0-openjdk-devel-debug, or java-1.7.0-openjdk-devel-debug, or java-1.6.0-openjdk-devel-debug packages on Redhat/Centos. To install it, run the following as root:

yum install java-1.8.0-openjdk-devel-debug

为了完整性,这里是检查哪些包包含jmap的命令:

For completeness, here's the command to check which packages include jmap:

yum whatprovides '*/jmap'

这里是示例输出:

1:java-1.6.0-openjdk-devel-1.6.0.37-1.13.9.4.el7_1.x86_64 : OpenJDK Development Environment
Repo        : updates
Matched from:
Filename    : /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.37.x86_64/bin/jmap



1:java-1.7.0-openjdk-devel-1.7.0.91-2.6.2.3.el7.x86_64 : OpenJDK Development Environment
Repo        : base
Matched from:
Filename    : /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.91-2.6.2.3.el7.x86_64/bin/jmap



1:java-1.8.0-openjdk-devel-1.8.0.65-3.b17.el7.x86_64 : OpenJDK Development Environment
Repo        : base
Matched from:
Filename    : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64/bin/jmap



1:java-1.8.0-openjdk-devel-debug-1.8.0.65-3.b17.el7.x86_64 : OpenJDK Development Environment with full debug on
Repo        : base
Matched from:
Filename    : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64-debug/bin/jmap



1:java-1.8.0-openjdk-devel-debug-1.8.0.65-3.b17.el7.x86_64 : OpenJDK Development Environment with full debug on
Repo        : @base
Matched from:
Filename    : /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-3.b17.el7.x86_64-debug/bin/jmap

这篇关于找不到jmap命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆