Java
Java copied to clipboard
Suggestion: Add unique named shims
Each of theses manifests overlap each other each time you install them, so one idea I had was to shim java.exe
and javaw.exe
but give their shim a different name, e.g for GraalVM JDK 17:
"bin": [
[
"bin\\javaw.exe",
"graalvm-jdk17-javaw"
],
[
"bin\\java.exe",
"graalvm-jdk17-java"
]
]
The wiki says that the recommended way is to have the overlap and then switch when you need to using scoop reset x
. This is partly so that other programs can find java
/javaw
, I think. See: https://github.com/ScoopInstaller/Scoop/wiki/Java#switching-javas
Right now we only update PATH
in the GraalVM manifests, which resets as explained in the comment above.
When I look at PATH
on my own machine, the shims
folder is right at the end of paths, so just providing a graalvm-jdk17-javaw
shim would not help if there are multiple GraalVM manifests installed using the same shim name. $version
expansion is not currently implemented to support bin
arrays. One option would be to use the manifest name as prefix for the java
/javaw
binaries (graalvm21-jdk17-javaw.exe
/graalvm21-jdk17-java.exe
), however without a scoop reset
, JAVA_HOME
and GRAALVM_HOME
will keep their value, and could potentially point to another GraalVM installation other than the version the shim executed points to.
scoop-shim: Add scoop shim to manipulate shims (https://github.com/ScoopInstaller/Scoop/issues/4727, https://github.com/ScoopInstaller/Scoop/issues/4736)
Use scoop shim
for this thing.