Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Search for embedded JREs #106

@ebourg

Description

@ebourg

I'd like to suggested an enhancement that would consist in finding automatically a JRE embedded in the application. Something more flexible that setting the exact path to the JRE with the JAVA_HOME variable in Info.plist. The idea is that the application takes care of updating its JRE and the launcher finds out where it's located.

Currently I'm using a dedicated base directory (Contents/Resources/Java/jre) where the JREs are installed, there is always at least one subdirectory with a JRE, for example Contents/Resources/Java/jre/jre-8u282-macosx-x64/. The stub has been patched to look for a JRE in the jre directory:

# embedded JREs
if [ -d "${WorkingDirectory}/jre" ] ; then
	while read -r embeddedJRE; do
		embeddedJRE+="/bin/java"
		version=$(get_java_version_from_cmd "${embeddedJRE}")
		allJVMs+=("$version:$embeddedJRE")
	done < <(find "${WorkingDirectory}/jre" -type d -mindepth 1 -maxdepth 1)
	# unset for loop variables
	unset version
fi

This could probably be improved by making the base jre directory configurable. Also an embedded JRE could also be selected in priority over other alternatives.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions