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:
# Allow local script executionSet-ExecutionPolicy RemoteSigned -Scope CurrentUser
# Install Scoopiwr -useb get.scoop.sh | iex
# Verify installationscoop helpInstall Multiple JDK Versions
1. Add the Java Bucket
scoop bucket add java2. List Available JDK Versions
scoop search jdk3. Install Different Versions
# Install OpenJDK 8scoop install openjdk8-redhat
# Install OpenJDK 21scoop install openjdk214. Switch JDK Versions
# Switch to JDK 8scoop reset openjdk8-redhat
# Switch to JDK 21scoop reset openjdk21
# Switch to GraalVM 21scoop reset graalvm21-jdk21If you previously installed JDK manually, consider removing the system
JAVA_HOMEenvironment variable — Scoop manages user-levelJAVA_HOMEautomatically.
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!













