java

Ben Sless 2021-05-06T13:10:14.001800Z

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

jumar 2021-05-06T15:28:50.001900Z

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

Ben Sless 2021-05-06T15:46:25.002100Z

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

jumar 2021-05-06T16:25:26.002300Z

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

Ben Sless 2021-05-06T16:46:59.002500Z

jenv might need some updates with regards to hooks

Ben Sless 2021-05-06T16:54:19.002700Z

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