简体   繁体   中英

connect Java VisualVM to a local application

When i try connect Java VisualVM to a local application via an explicit JMX connection with following cmd java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar javaws.jar it gives an error:

unable to access jarfile javaws.jar.

But, when i use another .jar file it works. But does not work for javaws.jar. What is the reason for this exception.

may be the command is not able to identify the jar file palce.

Try with this option

java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9898 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -jar "%JAVA_HOME%"\\jre\\lib\\javaws.jar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM