Fork me on GitHub
#java
<
2021-05-06
>
Ben Sless13:05:14

Anyone has experience with configuring jenv and visualvm? I'm on linux with bash if it's relevant

jumar15:05:50

The question is how you use jenv to set proper JDK version for visualvm?

Ben Sless15:05:25

new releases of visualVM require --jdkhome Ended up wrapping it in a script

${HOME}/.local/visualvm/latest/bin/visualvm --jdkhome ${JAVA_HOME} "$@"
Then run it with
jenv exec visualvm-wrap

jumar16:05:26

Interesting. I had a similar problem with Java Mission Control - I just ended up hardcoding the proper java version in their startup script.

Ben Sless16:05:59

jenv might need some updates with regards to hooks

Ben Sless16:05:19

It wasn't properly documented but you can use

visualvm_jdkhome=$JAVA_HOME visualvm
Makes for a simple method of adding a visualvm plugin to jenv. JMC probably has something similar