JMX examples don't work under windows
5 comments
Comment from: Andrew Swan [Visitor]
tilde “~” is Un*x talk for your home directory.
Maybe true, but in Windows it simply indicates that some characters in a path had to be truncated because they exceeded the MS-DOS 8.3 character limit for file and directory names. So:
C:\DOCUME~1\davidne\LOCALS~1\Temp
Is actually an abbreviated version of:
C:\Documents and Settings\davidne\Local Settings\Temp
You’ll find that this directory does in fact exist.
Hope this helps.
Comment from: davidnewcomb [Member]
I understand the DOS abbreviation and that there is a real directory but if your %TMP% folder contains tildes it just doesn’t work!
Comment from: Mika Pussinen [Visitor]
Thanks for the info. Helped me as well. Before I knew about this TMP environment variable fix only workaround was to tell jmxremote port explicitly in command line and use remote connection facility of jconsole.
- starting of java example app to examine: java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8081 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -jar Notepad.jar
- starting of jconsole: jconsole localhost:8081
But after setting TMP to not tilde path everything worked fine without this remote connection workaround.
Comment from: Mayank [Visitor]
I am trying to connect to a remote machne using jconsole through windows command line. But not able to connect, here is the command I am using : jconsole host:38686 -J-usernema=admin -J-password=admin
Form is loading...
Hi David,
Thanks for posting that - I’ve put a link to your post here: http://blogs.sun.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole
I hope it can help other developers!
Cheers,
– daniel