OpenJDK JDK11 not having JMC- Java Mission Controller- FlightRecorder

穿精又带淫゛_ 提交于 2019-12-03 07:11:50

问题


I was hoping JMC would be available with OpenJDK, JDK11 binaries as this has been opensourced from Java 11 by oracle, but could not locate this in Oracle and AdoptOpenJDK Java-11 binaries under bin folder. I have also tried this https://jdk.java.net/jmc/ as some article said its being releases separately. Does anyone know how to get JMC for OpenJDK-11.


回答1:


Normally the builds will be available here: https://jdk.java.net/jmc/

See http://hirt.se/blog/?p=1007 for more information on the new delivery format.

The builds have been (temporarily) pulled because a switch from the old javax.mail coordinates to the new coordinates at jakarta-ee has not yet gotten the proper third-party approval. A new build, with plenty of fixes and with all the approvals properly in place (or a revert of the change), should be along within the next few weeks.

Up until then it is possible (also not hard) to build JMC 7, by pulling the official JMC repo from here: https://hg.openjdk.java.net/jmc/jmc7/

You can also build and pull the mainline mirror from the inofficial GitHub repo: https://github.com/JDKMissionControl/jmc

For more information on building JMC, see: http://hirt.se/blog/?p=947 (or simply read the README.md in the repository root)

Good luck!




回答2:


Since Java11, JMC is not part of the JDK any more. It is a separate project, as you already noticed.

https://www.oracle.com/technetwork/java/javase/11-relnote-issues-5012449.html




回答3:


Azul provides free, unsupported builds of Zulu Mission Control available for download at http://azul.com/products/zulu-mission-control

Builds are available for clients running Windows, Linux, and Mac OS X.




回答4:


I believe they're still evaluating GitHub to moving to an independent repository with current progress being still under jmc7.

You can currently download standalone versions from Oracle's website for mission-control.




回答5:


BellSoft provides Liberica Mission Control: https://bell-sw.com/pages/lmc/

As per their documentation, it's free to use in production environments, and there is a commercial support included as part of Support Subscription for Liberica JDK.




回答6:


Update

JMC 8 available when compiling it from source. Here is a single command for linux users to build your own copy of jmc

mkdir ~/jmcToDelete && \
cd ~/jmcToDelete && \
git clone https://github.com/openjdk/jmc.git && \
cd jmc/releng/third-party && \
mvn p2:site && \
runJetty="mvn jetty:run" && \
bash -c "$runJetty &" && \
cd ~/jmcToDelete/jmc/core && \
mvn clean install && \
cd ~/jmcToDelete/jmc && \
mvn package -Dmaven.test.skip=true && \
kill $(jps | grep Launcher | awk '{print $1}') && \
sudo mkdir -p /opt/java/jmc && \
sudo tar xzf  $(find ~/jmcToDelete/jmc/target -name '*.jmc-linux*') -C /opt/java/jmc  && \
sudo ln -s  /opt/java/jmc/jmc   /usr/local/bin/jmc  && \
rm -rf ~/jmcToDelete

typing jmc in a terminal should start it.

Outdated

As stated by Hirt you can compile it from http://hg.openjdk.java.net/jmc The jmc available in jdk8 (v5.5) requires the special flags -XX:+UnlockCommercialFeatures -XX:+FlightRecorder to be present in the JVM process and it will not retrieve "flight records" if they are not there, so you can only use it with java1.8. If you would like to add those flags on openjdk-11 it will fail with Unrecognized VM option 'UnlockCommercialFeatures' meaning that you don't need them as they are enabled by default ( FlightRecorder ).

I compiled jmc-7.1.0 without issues by downloading the gz archive from http://hg.openjdk.java.net/jmc/jmc/ Follow the steps present in the README file: Make sure the compilation is done with jdk1.8 In one terminal :

cd releng/third-party
mvn p2:site
mvn jetty:run

And in the second terminal:

cd core
mvn clean install
cd ..
mvn package

On completion you should have all your artefacts in the target folder. The default jmc start script has a lot of flags present and it will not start with all of them, hence you can start the intended jar using

java -jar ./jmc-[...]/target/products/jmc/plugins/org.eclipse.equinox.launcher_[...].jar


来源:https://stackoverflow.com/questions/53882496/openjdk-jdk11-not-having-jmc-java-mission-controller-flightrecorder

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!