Manage Multiple JDK/ JAVA version on windows machine

preview_player
Показать описание
How to manage multiple JDK or Java versions on a windows machine easily.

The sample Bat file is here.

@echo off
set JAVA_HOME=C:\Program Files\Java\jdk-9.0.4
set Path=%JAVA_HOME%\bin;%Path%
echo Java 9 activated.

Download Oracle JDK

Download Open JDK

Github Source Code and scripts available
Рекомендации по теме
Комментарии
Автор

can you do a tutorial bout how to use multiple instances of Apache Tomcat which can work with the way you change jdk versions. tks!

thuccanh
Автор

The batch file runs but the JAVA_HOME path doesn't change. Do you know why that is? I tried setting a default path for JAVA_HOME and deleting JAVA_HOME from my user variables but still doesn't work either way.

divinegrace
Автор

Hey my friends I have some problems Editing Environment Variable, the CMD shows me the next message when trying to switch jdk version:
C:\Users\riosa>jkd8
'jkd8' is not recognized as an internal or external command,
operable program or batch file.

rivers