ajermakovics / jvm-mon

Console-based JVM monitoring tool
https://ajermakovics.github.io/jvm-mon/
Other
1.48k stars 117 forks source link

Doesn't work when not run from within the exploded zip/tar #8

Closed dwijnand closed 7 years ago

dwijnand commented 7 years ago
$ opt/jvm-mon-0.1/bin/jvm-mon
objc[39393]: Class JavaLaunchHelper is implemented in both /Users/dnw/.jenv/versions/1.8/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

node.js:376
        callback();
        ^
module.js:341: Error: Cannot find module '/Users/dnw/opt/jvm-mon-0.1/bin/src/dist/jvm-mon.js'

$ cd opt/jvm-mon-0.1
$ bin/jvm-mon
objc[39418]: Class JavaLaunchHelper is implemented in both /Users/dnw/.jenv/versions/1.8/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.~
$ # that worked
ajermakovics commented 7 years ago

I suspected this was the case. Ideally the bin/jvm-mon script would handle this by changing current working directory. Unfortunately that script is generated by Gradle on every build and tweaking it is tricky

sergiotudela commented 7 years ago

The same for here.

$ cd opt/jvm-mon-0.1
$ bin/jvm-mon

It worked for me.

ajermakovics commented 7 years ago

Added a fix in the new version (0.2) to allow running from other directories

dwijnand commented 7 years ago

Works great. Thanks @ajermakovics.