-
Notifications
You must be signed in to change notification settings - Fork 92
Home
OpenJDK is the preferred JDK (because of its Open Source license).
The Scoop Java bucket contains five different OpenJDK builds.
Oracle's OpenJDK version (openjdk.json) can be installed with:
scoop install openjdk
AdoptOpenJDK has versions with HotSpot and Eclipse OpenJ9 JVMs.
adopt8-upstream.json is the preferred Java 8 JDK. Oracle does not distribute Oracle 8 JDK:s anymore, see FAQ here. Oracle 8 JRE is available through the oraclejre8.json manifest.
adoptopenjdk-hotspot.json can be installed with:
scoop install adoptopenjdk-hotspot
adoptopenjdk-hotspot-jre.json can be installed with:
scoop install adoptopenjdk-hotspot-jre
adoptopenjdk-openj9.json can be installed with:
scoop install adoptopenjdk-openj9
adoptopenjdk-openj9-jre.json can be installed with:
scoop install adoptopenjdk-openj9-jre
ojdkbuild manifests requires lessmsi to be installed and configured by running scoop config MSIEXTRACT_USE_LESSMSI true
.
Oracle’s Java is also available in the oraclejdk manifest.
There are two solutions available today for switching java:
scoop reset
works very well for the current session, and will also update the user's path. Please note https://github.com/lukesampson/scoop/issues/3822 - currently this isn't working for all available packages.
Globally installed javas takes precedence over user-installed javas, so running sudo scoop install -g oraclejdk-lts
will install a java that is always default for new sessions.
PS C:> scoop install oraclejdk
Installing 'oraclejdk' (12.0.2-10) [64bit]
PS C:> scoop install zulu6
Installing 'zulu6' (6.18.1.5) [64bit]
PS C:> scoop install openjdk10
Installing 'openjdk10' (10.0.1) [64bit]
PS C:> java -version
openjdk version "10.0.1" 2018-04-17
OpenJDK Runtime Environment (build 10.0.1+10)
OpenJDK 64-Bit Server VM (build 10.0.1+10, mixed mode)
PS C:> scoop reset zulu6
Resetting zulu6 (6.18.1.5).
Linking ~\scoop\apps\zulu6\current => ~\scoop\apps\zulu6\6.18.1.5
PS C:> java -version
openjdk version "1.6.0-99"
OpenJDK Runtime Environment (Zulu 6.18.1.5-win64) (build 1.6.0-99-b99)
OpenJDK 64-Bit Server VM (Zulu 6.18.1.5-win64) (build 23.77-b99, mixed mode)
PS C:> scoop reset oraclejdk
PS C:> java -version
java version "12.0.2" 2019-07-16
Java(TM) SE Runtime Environment (build 12.0.2+10)
Java HotSpot(TM) 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)