Switch Java (JDK) Versions Freely with Scoop

187 words
1 minute
Switch Java (JDK) Versions Freely with Scoop

Switch Java (JDK) Versions Freely with Scoop#

In daily development, you often need to switch between different JDK versions like Java 8, Java 11, Java 17, or Java 21. Manual uninstallation and cleanup of registry entries is painful. Scoop makes this effortless.

Install Scoop#

Open PowerShell and run:

Terminal window
# Allow local script execution
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
# Install Scoop
iwr -useb get.scoop.sh | iex
# Verify installation
scoop help

Install Multiple JDK Versions#

1. Add the Java Bucket#

Terminal window
scoop bucket add java

2. List Available JDK Versions#

Terminal window
scoop search jdk

3. Install Different Versions#

Terminal window
# Install OpenJDK 8
scoop install openjdk8-redhat
# Install OpenJDK 21
scoop install openjdk21

4. Switch JDK Versions#

Terminal window
# Switch to JDK 8
scoop reset openjdk8-redhat
# Switch to JDK 21
scoop reset openjdk21
# Switch to GraalVM 21
scoop reset graalvm21-jdk21

If you previously installed JDK manually, consider removing the system JAVA_HOME environment variable — Scoop manages user-level JAVA_HOME automatically.

How It Works#

scoop reset updates the user’s JAVA_HOME and PATH environment variables to point to the selected JDK directory. Changes take effect immediately in new terminal windows — no restart needed.

Similarly, Python, Ruby, Node.js, and other runtimes can be managed with Scoop for effortless version switching.

Support & Share

If this article helped you, please share or support!

Sponsor
Switch Java (JDK) Versions Freely with Scoop
https://blog.zinzin.cc/posts/scoop-switch-jdk-en/
Author
gzdyj
Published at
2026-07-23
Profile Image of the Author
gzdyj
Code, life, and everything in between.
Announcement
Welcome to my blog! This is a sample announcement.
Categories
Tags
Latest Moments
Site Statistics
Posts
8
Categories
4
Tags
27
Total Words
13,116
Running Days
0 days
Last Activity
0 days ago
Site Info
Build Platform
GitHub Actions
Blog Version
Firefly v6.14.5
License
CC BY-NC-SA 4.0