在 Ubuntu (OpenJDK 8) 上哪里可以找到 Java Mission Control 和 VisualVM?
Where to find Java Mission Control and VisualVM on Ubuntu (OpenJDK 8)?
我使用 sudo apt-get install openjdk-8-jdk
在 Ubuntu 上安装了 OpenJDK 8,它被安装到 /usr/lib/jvm/java-8-openjdk-amd64
。
在哪里可以找到 Java Mission Control(我认为称为 jmc
)和 VisualVM(我认为称为 jvisualvm
)程序?
我假设两者都安装了 JDK:
- The Java Mission Control page 表示 "Starting with the release of Oracle JDK 7 Update 40 (7u40), Java Mission Control is bundled with the HotSpot JVM."
- The VisualVM page 说 "March 18th, 2014: JDK 8 has been released and is available for download here. It contains Java VisualVM tool based on VisualVM 1.3.6."
我错过了什么?两者都只是 Oracle JDK 的一部分,还是我使用了错误的安装命令?
如果它们不是 OpenJDK 的一部分,我可以使用 apt-get install
下载它们吗?
Java Mission Control 是一个 Oracle 插件。如果您想配置文件,我建议您使用 OpenJDK and/or 像 YourKit 这样的商业配置文件。
If they are not part of the OpenJDK, can I download them using apt-get install
同意他们的使用许可后,您必须从 Oracle 网站下载它。
一些 OpenJDK 发行版维护者现在提供 jmc 构建,例如 AdoptOpenJDK, Amazon Corretto or Azul Zulu。
Java Mission Control (jmc) 是开源的并托管在 GitHub and openjdk.java.net 上(作为 Mercurial 存储库)。
官方夜间构建可用here。
使用 readme file:
中的说明自行构建 jmc 也相当容易
hg clone http://hg.openjdk.java.net/jmc/jmc/
cd jmc/releng/third-party
mvn p2:site
mvn jetty:run
在不同的终端:
cd core
mvn clean install
cd ..
mvn package
安装完成后,您可以在第一个终端关闭Jetty服务器运行。
或者,您可以使用 Docker 构建 jmc:
docker-compose -f docker/docker-compose.yml run jmc
启动 jmc:
- 在 Linux 上:
target/products/org.openjdk.jmc/linux/gtk/x86_64/jmc
- 在 macOS 上:
target/products/org.openjdk.jmc/macosx/cocoa/x86_64/JDK\ Mission\ Control.app/Contents/MacOS/jmc
- 在 Windows 上:
target\products\org.openjdk.jmc\win32\win32\x86_64\jmc.exe
您现在应该会看到启动画面:
更多信息在此blog post。
Steven 提供的构建说明的替代方法是使用 docker-compose 进行构建:
$ hg clone http://hg.openjdk.java.net/jmc/jmc/
$ cd jmc/jmc/docker
$ docker-compose up
# Wait for the build to finish, then exit it with Ctrl-C
$ cd ../target
$ ls products/org.openjdk.jmc/
linux macosx win32
# Run the binary from the correct OS
$ ./products/org.openjdk.jmc/linux/gtk/x86_64/jmc
我使用 sudo apt-get install openjdk-8-jdk
在 Ubuntu 上安装了 OpenJDK 8,它被安装到 /usr/lib/jvm/java-8-openjdk-amd64
。
在哪里可以找到 Java Mission Control(我认为称为 jmc
)和 VisualVM(我认为称为 jvisualvm
)程序?
我假设两者都安装了 JDK:
- The Java Mission Control page 表示 "Starting with the release of Oracle JDK 7 Update 40 (7u40), Java Mission Control is bundled with the HotSpot JVM."
- The VisualVM page 说 "March 18th, 2014: JDK 8 has been released and is available for download here. It contains Java VisualVM tool based on VisualVM 1.3.6."
我错过了什么?两者都只是 Oracle JDK 的一部分,还是我使用了错误的安装命令?
如果它们不是 OpenJDK 的一部分,我可以使用 apt-get install
下载它们吗?
Java Mission Control 是一个 Oracle 插件。如果您想配置文件,我建议您使用 OpenJDK and/or 像 YourKit 这样的商业配置文件。
If they are not part of the OpenJDK, can I download them using apt-get install
同意他们的使用许可后,您必须从 Oracle 网站下载它。
一些 OpenJDK 发行版维护者现在提供 jmc 构建,例如 AdoptOpenJDK, Amazon Corretto or Azul Zulu。
Java Mission Control (jmc) 是开源的并托管在 GitHub and openjdk.java.net 上(作为 Mercurial 存储库)。
官方夜间构建可用here。
使用 readme file:
中的说明自行构建 jmc 也相当容易hg clone http://hg.openjdk.java.net/jmc/jmc/
cd jmc/releng/third-party
mvn p2:site
mvn jetty:run
在不同的终端:
cd core
mvn clean install
cd ..
mvn package
安装完成后,您可以在第一个终端关闭Jetty服务器运行。
或者,您可以使用 Docker 构建 jmc:
docker-compose -f docker/docker-compose.yml run jmc
启动 jmc:
- 在 Linux 上:
target/products/org.openjdk.jmc/linux/gtk/x86_64/jmc
- 在 macOS 上:
target/products/org.openjdk.jmc/macosx/cocoa/x86_64/JDK\ Mission\ Control.app/Contents/MacOS/jmc
- 在 Windows 上:
target\products\org.openjdk.jmc\win32\win32\x86_64\jmc.exe
您现在应该会看到启动画面:
更多信息在此blog post。
Steven 提供的构建说明的替代方法是使用 docker-compose 进行构建:
$ hg clone http://hg.openjdk.java.net/jmc/jmc/
$ cd jmc/jmc/docker
$ docker-compose up
# Wait for the build to finish, then exit it with Ctrl-C
$ cd ../target
$ ls products/org.openjdk.jmc/
linux macosx win32
# Run the binary from the correct OS
$ ./products/org.openjdk.jmc/linux/gtk/x86_64/jmc