Problem description
Prompt when running JVisualVM in the JAVA_HOME/bin directory
The operation couldn’t be completed. Unable to locate a Java Runtime that supports jvisualvm.
Please visit http://www.java.com for information on installing Java.
Copy the code
The environment that
MacOS Sur 11.2.3 JDK 1.8.0_265 (x86_64)
Error cause analysis and resolution
Jvisualvm is supported by OracleJDK/OpenJDK. It is not supported by the Community version of the AdoptOpenJDK.
Assuming this is the case, there are two solutions
- use
Oracle
Version of the JDK - Download individual
jvisualvm
Here I use the second solution, go to the VisualVM website to download a separate JVisualVM, install it and use it normally
Reference: github.com/oracle/visu…