未找到 jmap 命令
我正在尝试在我的服务器上使用该命令,但它一直告诉我,即使我安装了JDK,也找不到该命令。jmap
CentOS
下面是命令的输出: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)
如何解决此问题?
我正在尝试在我的服务器上使用该命令,但它一直告诉我,即使我安装了JDK,也找不到该命令。jmap
CentOS
下面是命令的输出: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)
如何解决此问题?
你应该能够在 Redhat/Centos 上的 java-1.8.0-openjdk-devel-debug、java-1.7.0-openjdk-devel-debug 或 java-1.6.0-openjdk-devel-debug 软件包中找到 jmap。要安装它,请以 root 用户身份运行以下命令:
yum install java-1.8.0-openjdk-devel-debug
为了完整起见,下面是检查哪些包包含 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
以下内容对我有用:
sudo apt-get install openjdk-8-jdk openjdk-8-dbg