Setting Java version in Windows

Maggie
1 min readJun 26, 2024

--

26-Jun-2024

Back technology work. I was planning to write backend with Java, while other friend writing frontend with React Native.

For my first time, I would like to start with easy level. SpringBoot is what I am looking for. At least java version of 17 is required for Spring 3.0 but my computer preinstalled java 16 already. I need to upgrade the java version. What popped up in mind is sdk manager, the version control tools recommended by my senior. I would like to do it on my own so I skipped this method and looking for the other ways.

I downloaded the long term support version(LTS) of java by chocolatey.

```
choco install openjdk — version=21.0.0
java -version

```

The version of my computer still remains to be v16. I remember that the JAVA_HOME and PATH in environment variables should be updated.
You could refer to this link to see how to update the variables:
https://www.java.com/en/download/help/path.html

In my mind, java should be updated as the path was pointed to the installed version. HOWEVER, in windows 10, there is a preset PATH you need to remove it from the list. That is ```C:\Program Files (x86)\Common Files\Oracle\Java\javapath``` , you mind try to find where is yours located.

After removing the path from PATH in system variables, java version finally got updated.

One step closer to build the server!!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response