Skip to content

oracle-visualvm-issues-623 Added JAVA_HOME to visulavm luncher & conf #643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
6 changes: 5 additions & 1 deletion visualvm/launcher/visualvm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ esac


if [ -f "$progdir"/../lib/visualvm/etc/visualvm.conf ] ; then
visualvm_jdkhome="$basedir"
if [[ -d "$JAVA_HOME" && -f "$JAVA_HOME/bin/java" ]]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Windows version also takes JDK_HOME into consideration, maybe it would be better to have the same behaviour.

visualvm_jdkhome="$JAVA_HOME"
else
visualvm_jdkhome="$basedir"
fi
old=`pwd`
cd "$progdir/../lib/visualvm/"
basedir=`pwd`
Expand Down
2 changes: 1 addition & 1 deletion visualvm/launcher/visualvm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ visualvm_default_options="-J-Xms24m -J-Xmx768m -J-Dnetbeans.accept_license_class
# installer points to one of those in the VisualVM application shortcut
# based on the Java version selected at installation time.
#
#visualvm_jdkhome="/path/to/jdk"
visualvm_jdkhome="${JAVA_HOME}"

# Additional module clusters:
# using ${path.separator} (';' on Windows or ':' on Unix):
Expand Down