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

Search for embedded JREs #106

Open
ebourg opened this issue Feb 16, 2021 · 1 comment
Open

Search for embedded JREs #106

ebourg opened this issue Feb 16, 2021 · 1 comment

Comments

@ebourg
Copy link
Contributor

ebourg commented Feb 16, 2021

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.

@tofi86
Copy link
Owner

tofi86 commented Feb 20, 2021

Hi @ebourg,
thanks for your suggestion. That sounds like a reasonable feature request and I will look into it in the next couple of days...

@tofi86 tofi86 added this to the Version 3.2.0 milestone Feb 20, 2021
@tofi86 tofi86 removed this from the Version 3.3.0 milestone Feb 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants