adoptium / adoptium/installer

JAVA_HOME Path set "bug?"

Open
#409 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jinja
Stars
168
Forks
77
Avg merge
2d 14h
Merged PRs (30d)
12

Description

If the "JAVA_HOME" environment variable has been edited on a Windows workstation, no upgrade or installation of OpenJDK will add/edit the Java Home variable again even when you tell it to. For example: You add a JAVA_HOME env. variable and set it to "C:\java", you then delete this env. variable and restart, when you install any version of OpenJDK and choose the option to add the Java Home variable it will not do it. This also impacts upgrading OpenJDK so if someone messes with their Java Home variable, future OpenJDK updates/versions will not update the Java Home to reflect the new install path. If you install OpenJDK on a machine where nobody has messed with the JAVA_HOME env. variable, it will add Java Home just fine and when updating to a new version of openjdk, it will update the Java Home variable to reflect the new directory.

We have users who have updated their Java Home in the past and now every update of OpenJDK will break their local Java path because it holds on to the old path to OpenJDK.
Thx

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Reproduce the Windows install and upgrade sequence with JAVA_HOME first set to C:\java and then removed, then locate the OpenJDK installer logic that handles JAVA_HOME. Done means installation and upgrades set it to the current install path without breaking existing users.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
operating-systems, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.