You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A patch file would be great. That way, there is a commit description and it states you as the author.
Some questions on the change itself:
The default behavior of archlinux-java-run is to use exec to call Java. So it seems to me that the main addition of the newly added env_switch_java_home function is to set $JAVA_HOME and $PATH before doing the exec. Is that right? If so, exec seems not the most descriptive command line flag to trigger this behavior.
Is it deliberate to call env_switch_java_home before the loop that adds feature-specific Java args?
Ah, I missed that. OK, that is indeed a use case that I already needed in a package and implemented directly in the package. But having it in here does make sense.
Both versions are fine. I think I prefer the first one as it has less deep nesting. Could you post a git am patch?
Activity
michaellass commentedon Feb 14, 2026
Hi! Is there a specific reason you posted this change as an issue instead of a pull request?
ahmubashshir commentedon Feb 14, 2026
Didn't want to create yet another fork that I might delete after the PR gets merged...
It'd be great if github could create PR's from email (like source hut)
or, I can paste
git-am'able patch if you want...(actually I'm trying to convince myself that gerrit is a good idea, sent a few patches via gerrit so... /s)
michaellass commentedon Feb 14, 2026
A patch file would be great. That way, there is a commit description and it states you as the author.
Some questions on the change itself:
execto call Java. So it seems to me that the main addition of the newly addedenv_switch_java_homefunction is to set $JAVA_HOME and $PATH before doing the exec. Is that right? If so,execseems not the most descriptive command line flag to trigger this behavior.env_switch_java_homebefore the loop that adds feature-specific Java args?ahmubashshir commentedon Feb 14, 2026
As this executes arbitrary executable, instead of
$JAVA_HOME/bin/java, I think it should be called before feature-specific java args...I'll primarily use it to spawn a shell with non-default jdk to make gradle run without freaking out...
like this
archlinux-java-run -b 11 -f jdk -e -- bash -iahmubashshir commentedon Feb 14, 2026
or this flow will be better?
I tried minimizing line changes in the first patch...
michaellass commentedon Feb 14, 2026
Ah, I missed that. OK, that is indeed a use case that I already needed in a package and implemented directly in the package. But having it in here does make sense.
Both versions are fine. I think I prefer the first one as it has less deep nesting. Could you post a
git ampatch?ahmubashshir commentedon Feb 14, 2026
0001-Add-exec-flag-to-run-commands-with-selected-JVM.patch
michaellass commentedon Feb 14, 2026
Thanks for your contribution! I will likely release this as v12 soon (see #12)
michaellass commentedon Feb 20, 2026
The change has been merged by now. v12 including this addition will be released within the next couple of minutes. Thanks again for your contribution!