How to use multiple Java versions at the same time?

preview_player
Показать описание
#applyit #java #jdk #jdk18 #jdk8 #jdk19
When we are working on multiple java projects at the same time, we need both java versions available. However changing environment variable frequently is not efficient approach. This video demonstrates how can we automate setting a required java version. We just need to run one command to set the required java version and within a second, the desired java version becomes available.

This video answers the following questions:
How to run multiple versions of Java on the same machine
How to run multiple versions of Java on Windows
How to run multiple versions of Java on Linux
How to run multiple versions of Java on Ubuntu
How to run Java 8 and Java 18 simultaneously
Can we run two Java versions simultaneously
Can we run two Java versions at the same time
How to switch from one java version to another
How to switch from Java 8 to Java 18 using command prompt
Switch between Java versions using batch command
How to work with different Java versions simultaneouly
Рекомендации по теме
Комментарии
Автор

needed this to run multiple minecraft servers on different versions.

vp_bot
Автор

Switching from one java version to another is very quick with writing such command script file.

ApplyIT
Автор

And what is the content of the other files? Carnac, cloc, cloc-1.64, ngrok?

rimbaud
Автор

Thanks alot sirji .jumping from java8 to java 21 was getting me headache with trick its just type cmd.

SDET_QA_Eng
Автор

How does windows detect the C:\Tools folder to pickup the changes from jdk8.bat and jdk18.bat files. It seems what you are showing is all in the same folder. Your changes are only for the current CLI session, correct?

safkaify
Автор

Bro it's worked. Can I use this for my blog (develop this method and try my new ideas)

pasindupabasara
Автор

i am unable to switch from jdk17 to jdk 8, even if i execute jdk8 command it runs jdk17.i am not using openjdk, i am using JDK 17

avinashjha
Автор

That's all in the same folder. You're changes are only for the current CLI session.

TreeLuvBurdpu
Автор

I'm junior and starting out. I created the two batch files. The jdk7.bat and jdk11.bat (in my case.) I try to run it on my command prompt on windows and it doesn't work. It gives me the following error:

'jdk11' is not recognized as an internal or external command,
operable program or batch file.

The same is thrown for jdk7.bat. Anyone?

rodrick
Автор

On my operating system I did exactly as in the video and it didn't work

CorporateCode-wg
welcome to shbcf.ru