1. Create new custom variable that point to the preferred version

  2. Set %JAVA_HOME%/bin as first entry to Path Variable

  3. Profit!

    Check with java -version

Why not just remove the Oracle Java path entry and not worry about your JAVA_HOME placement in the Path?

You might suggest to simply remove the Oracle Java path that was prepended to your Windows PATH by the installer. Yes, I thought of that too, but the installer also copies the java.exe, javaw.exe, and javaws.exe files to C:\Windows\System32 directory, which is also in the Windows PATH variable. So rather than chase down all the possible directories that the installer put Java, and to avoid deleting the System32 files that actually may be necessary to some process somewhere, I decided that simply prepending my preferred Java Home directory to the path was best option.

Source: How to set custom Java path after installing JDK 8 – Douglas C. Ayers

Answer from Ooker on Stack Overflow
Discussions

How to downgrade Java version default installed into Azure Portal from Java 17 to Java 11
Windows for business | Windows Server | User experience | PowerShell ... This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information. Comments have been turned off. Learn more ... To downgrade the default Java version installed in the Azure Portal from Java 17 to Java 11... More on learn.microsoft.com
🌐 learn.microsoft.com
3
0
May 16, 2022
How do I switch between Java versions?
Please ensure that: Your code is properly formatted as code block - see the sidebar (About on mobile) for instructions You include any and all error messages in full You ask clear questions You demonstrate effort in solving your question/problem - plain posting your assignments is forbidden (and such posts will be removed) as is asking for or giving solutions. Trying to solve problems on your own is a very important skill. Also, see Learn to help yourself in the sidebar If any of the above points is not met, your post can and will be removed without further warning. Code is to be formatted as code block (old reddit: empty line before the code, each code line indented by 4 spaces, new reddit: https://i.imgur.com/EJ7tqek.png ) or linked via an external code hoster, like pastebin.com, github gist, github, bitbucket, gitlab, etc. Please, do not use triple backticks (```) as they will only render properly on new reddit, not on old reddit. Code blocks look like this: public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } } You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above. If your post has remained in violation of these rules for a prolonged period of time (at least an hour), a moderator may remove it at their discretion. In this case, they will comment with an explanation on why it has been removed, and you will be required to resubmit the entire post following the proper procedures. To potential helpers Please, do not help if any of the above points are not met, rather report the post. We are trying to improve the quality of posts here. In helping people who can't be bothered to comply with the above points, you are doing the community a disservice. I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns. More on reddit.com
🌐 r/javahelp
13
11
March 20, 2023
How to revert to specific Java version (i.e.: java 11.0.18 instead of java 11.0.20)
Download it, extract it and add path in your environment. With this trick you can use several versions of Java for each user on your pc. More on reddit.com
🌐 r/openSUSE
4
4
July 31, 2023
consider downgrade the target java version to 8 or 11?
Apache Maven 3.6.3 (cecedd3430... locale: zh_CN, platform encoding: GBK OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" ... The target compiled .class's java version is 17, could downgrade it to 8 or 11?... More on github.com
🌐 github.com
2
September 4, 2023
🌐
HappyCoders.eu
happycoders.eu › java › how-to-switch-multiple-java-versions-windows
How to Change Java Versions in Windows (up to Java 25)
June 11, 2025 - Support for applets has been removed with Java 11, and I haven't worked with them in years, so I don't know if there's a way to change the Java version used for applets. ... Java folder is not editable. we cannot create any file in it. ... Try creating files in some other directory (say D drive) and then move those files to java folder. While moving, Windows will show a Administrator dialog box, click YES.
🌐
Customer Support
support.quotemedia.com › support › solutions › articles › 13000055272-how-to-downgrade-java-version-windows-user-
How to Downgrade Java Version (Windows User) : Customer Support
September 19, 2018 - You will see a window with a green bar appear, similar to below: - Check your Program Files folder and ensure that Java is no longer present, you will notice Java is no longer present within the Uninstall or Change a program list from one of our previous steps (Start Menu > Computer ? (C:) Drive > Program Files) - Following this link to Java 8u172 and select the Java SE Runtime Environment 8u172 (Note: x86 = 32-bit), we find that this works best with the Web Start Installer for the streamer.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 850521 › how-to-downgrade-java-version-default-installed-in
How to downgrade Java version default installed into Azure Portal from Java 17 to Java 11 - Microsoft Q&A
May 16, 2022 - In the "Java version" settings, select "Java 11" from the drop-down menu. Click on the "Save" button to apply the changes. Once the changes are saved, Azure will restart the App Service and configure it to use Java 11 instead of Java 17. It is important to note that downgrading the Java version may cause compatibility issues with your application.
🌐
Droidrant
droidrant.com › home › how do i downgrade to java 8 on windows?
How Do I Downgrade to Java 8 on Windows? [Answered 2023]- Droidrant
June 28, 2022 - If you do not have administrative rights, you will need to contact the support team and request the update. There are two ways to change Java versions on Windows. One way is to edit the Environment Variables in the Advanced System Settings. ... When you want to downgrade from Java 11 to Java ...
🌐
Oracle
java.com › en › download › help › other_jreversions.html
Where can I get older versions of Java and related documentation?
We highly recommend users remove all older versions of Java from your system. Keeping old and unsupported versions of Java on your system presents a serious security risk. Removing older versions of Java from your system ensures that Java applications will run with the most up-to-date security ...
Find elsewhere
🌐
Techwalla
techwalla.com › tech support › how to
How to Downgrade Java | Techwalla
November 16, 2018 - You can do a Java rollback in this instance by uninstalling the update. In Windows, go to the Control Panel and choose "Apps." Scroll down until you see the update on the list. From there, you can uninstall it.
🌐
YouTube
youtube.com › code with arjun
How to switch between the multiple Java versions(JDK) in windows 10 | Switch between java 8,11,15,17 - YouTube
In this Video i am going to show how to switch or manage the multiple java versions of jdk versions at a time in windows operating system. If you have java 8...
Published   June 25, 2021
Views   145K
🌐
Reddit
reddit.com › r/opensuse › how to revert to specific java version (i.e.: java 11.0.18 instead of java 11.0.20)
r/openSUSE on Reddit: How to revert to specific Java version (i.e.: java 11.0.18 instead of java 11.0.20)
July 31, 2023 -

Hello, how's it going?

I updated my Tumbleweed this morning, and my java-11-openjdk got updated from version 11.0.19 to 11.0.20. Since then, I've been trying to figure out a way to temporarily revert it to the previous version (until a software I use is updated and starts working with the latest Java version).

What are your thoughts on this?

🌐
Support Your Tech
supportyourtech.com › home › how to update java on windows 11: a step-by-step guide
How to Update Java on Windows 11: A Step-by-Step Guide
June 7, 2024 - If you’ve got Windows 11 and need to update Java, you’re in luck. Updating Java is pretty straightforward and only takes a few steps. You’ll need to download the latest Java version, uninstall any old versions, and then install the new one.
Top answer
1 of 1
3

You have two options ahead of you:

  1. You can uninstall JDK-16.0.2, then install OpenJDK 11 and have just that implementation on your system
  2. You can install OpenJDK 11 and use update-alternatives to specify which version you want to be treated as default

This answer will focus on the second option, though you can modify it to work for the first.

  1. Open a Terminal (if one is not already open) or SSH into the server you're installing Java onto
  2. Install the default Java runtime. For Ubuntu 20.04, this is version 11.0.11:
    sudo apt install default-jre
    
    If you want to be absolutely certain of the version, you can also specify the version:
    sudo apt install openjdk-11-jre-headless
    
  3. Install the default Java Development Kit:
    sudo apt install default-jdk
    
  4. Confirm the versions:
    java -version
    
    This should give you something like:
    openjdk version "11.0.11"
    OpenJDK Runtime Environment (build 11.0.11+9-post-Ubuntu-3ubuntu1)
    OpenJDK 64-Bit Server VM (build 11.0.11+9-post-Ubuntu-3ubuntu1, mixed mode, sharing)
    
    Also check the compiler:
    javac -version
    
    Which will give you something like:
    javac 11.0.11
    
  5. Set version 11 as the default for the system:
    sudo update-alternatives --config java
    
    This will give you an output similar to:
    There are 2 choices for the alternative java (providing /usr/bin/java).
    
      Selection    Path                                         Priority   Status
      --------------------------------------------------------------------------------
      0            /usr/lib/jvm/java-16-openjdk-amd64/bin/java   1111      auto mode
      1            /usr/lib/jvm/java-16-openjdk-amd64/bin/java   1111      manual mode
    * 2            /usr/lib/jvm/java-11-openjdk-amd64/bin/java   1091      manual mode
    
    Press <enter> to keep the current choice[*], or type selection number:
    
    You can also do this for the compiler with:
    sudo update-alternatives --config javac
    
  6. Confirm your JAVA_HOME variable is correct:
    sudo vi /etc/environment
    
    Note: Feel free to use any text editor that you prefer. The use of vi here is more a force of habit than an endorsement. Locate the JAVA_HOME variable and ensure it's set correctly:
    JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
    
    Reload your sources:
    source /etc/environment
    
    Verify the variable is set:
    echo $JAVA_HOME
    
    You should see:
    /usr/lib/jvm/java-11-openjdk-amd64
    

That's all there is to it 👍🏻

🌐
GitHub
github.com › iluwatar › uml-reverse-mapper › issues › 166
consider downgrade the target java version to 8 or 11? · Issue #166 · iluwatar/uml-reverse-mapper
September 4, 2023 - Apache Maven 3.6.3 (cecedd3430... locale: zh_CN, platform encoding: GBK OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows" ... The target compiled .class's java version is 17, could downgrade it to 8 or 11?...
Author   iluwatar
🌐
Support Your Tech
supportyourtech.com › home › articles › how to downgrade java version in windows 10: a step-by-step guide
How to Downgrade Java Version in Windows 10: A Step-by-Step Guide
February 14, 2025 - First, you’ll uninstall the Java version you currently have through the Control Panel, and then you’ll download and install the desired version from the official Java website. Following these steps ensures your applications run smoothly without compatibility issues. ... Ready to downgrade Java on your Windows 10 computer?
🌐
Quora
quora.com › How-do-you-rollback-a-Java-update
How to rollback a Java update - Quora
Answer (1 of 2): I don't think you can roll back a Java update. However, different versions of Java can sit side by side, and you may find the old version is still there. If using Windows, look in the applet Java adds to the Control Panel. You can disable the latest version if you don't want it....
🌐
GeekChamp
geekchamp.com › home › how to update java version in windows 11 using cmd
How to update Java version in Windows 11 using CMD - GeekChamp
May 16, 2026 - If a specific app requires a specific Java version, follow that app’s requirement instead of blindly installing the newest version. Some Java update commands require administrator rights, especially if Java is installed for all users under C:\Program Files. For best results, open an elevated Command Prompt. Click Start. ... Right-click Command Prompt. Select Run as administrator. Click Yes if Windows asks for permission. Screenshot description: The Windows 11 Start menu search panel shows “Command Prompt” as the best match.
🌐
GitHub
github.com › unimined › JvmDowngrader
GitHub - unimined/JvmDowngrader: Downgrades modern java bytecode to older versions. at either compile or runtime. · GitHub
Downgrades modern java bytecode to older versions. at either compile or runtime. - unimined/JvmDowngrader
Starred by 129 users
Forked by 13 users
Languages   Java 94.8% | Kotlin 5.2%