Comments on: How to Change Java Versions in Windows (updated for Java 23) https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/ Tue, 08 Apr 2025 17:05:33 +0000 hourly 1 By: Kennedy Kairaria https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-40771 Tue, 08 Apr 2025 17:05:33 +0000 https://www.happycoders.eu/?p=2959#comment-40771 Thanks. This works like a charm with command prompt and PowerShell.

]]>
By: Sven Woltmann https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-33849 Fri, 30 Aug 2024 10:27:53 +0000 https://www.happycoders.eu/?p=2959#comment-33849 In reply to Faizan Ahmed.

Yes, it will work. The scripts support Java versions all the way back to Java 1.2.

]]>
By: Faizan Ahmed https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-33821 Thu, 29 Aug 2024 13:51:57 +0000 https://www.happycoders.eu/?p=2959#comment-33821 Nice stuff, could definitely help me as a young software developer because I need to use different versions of the Java JRE and JDK for different applications. I want to ask: do these steps also work for switching between JRE versions 1.8 and 17?
I have an old game that requires a JRE v1.8, and I have a need to use JRE version 17 for Android application development.

Please let me know it is currently a pain for me to uninstall and re-install JRE v1.8 every time I wish to run the old game from about 20 years ago that runs best with JRE v1.8

]]>
By: Sven Woltmann https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-32250 Mon, 22 Jul 2024 10:11:18 +0000 https://www.happycoders.eu/?p=2959#comment-32250 In reply to Rash.

Hi Rash, please check if all the paths in javaX.bat are configured correctly. Maybe the path for Java 17 is not set up correctly?

]]>
By: Sven Woltmann https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-32249 Mon, 22 Jul 2024 10:09:27 +0000 https://www.happycoders.eu/?p=2959#comment-32249 In reply to Piyush Kumbhare.

Hi Piyush,

I am sorry to hear that you have trouble setting this up. And it's difficult to help from far away.

When you set the version permanently, it will affect only a Powershell that you open afterwards. Maybe you checked in a Powershell that was already open?

]]>
By: Piyush Kumbhare https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-31851 Wed, 17 Jul 2024 13:31:10 +0000 https://www.happycoders.eu/?p=2959#comment-31851 Sorry for the incomplete comment before! I am again facing the problem in using the commands in pewershell opened as administrator. I am now unable to call out the java version but able to set the permanent java version. Also, when I callout java version in another shell it shows the default java version and not the set version.

]]>
By: Piyush Kumbhare https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-31850 Wed, 17 Jul 2024 13:19:40 +0000 https://www.happycoders.eu/?p=2959#comment-31850 I have all the steps and got the proper result. But I'm unable to set the other java version as permanent it is default to the java-22, that I just installed before all this process. Please, help to figure out this problem! And by the way thank you very much Sir for this amazing blog on java, it helped me a lot and clearly understandable! Thanks again!

]]>
By: Arber https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-31469 Thu, 11 Jul 2024 21:07:00 +0000 https://www.happycoders.eu/?p=2959#comment-31469 Hi Sven,

As simple as it sounds this was incredible to do, to read and follow. Thank you for your wonderful contribution and I hope I will stumble upon more of your work in the future :)

Kindly,
Arber

]]>
By: Sven Woltmann https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-30070 Tue, 18 Jun 2024 20:35:50 +0000 https://www.happycoders.eu/?p=2959#comment-30070 In reply to Tresa Chastain.

Well ... you could delete the whole Java directory and install a new version in the same directory. But that's not the point of this tutorial :-)

The point is to be able to switch between the different versions depending on your current project. I, for example, work on Java 11 projects, on Java 17 projects, on Java 21 projects, on Java 22 projects, and on Java 23 projects – all at the same time. So I need to switch the Java version multiple times each day.

]]>
By: Tresa Chastain https://www.happycoders.eu/java/how-to-switch-multiple-java-versions-windows/#comment-30068 Tue, 18 Jun 2024 19:36:54 +0000 https://www.happycoders.eu/?p=2959#comment-30068 can't i just delete java.exe and replace it with a newer version?

]]>