adoptium / adoptium/installer

Windows Installer: Provide reliable installation path

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

Description

When installing any of the Adoptium versions on Windows a version specific (including patch level) path is used by default:
![Screenshot 2022-01-23 at 12 08 28](https://user-images.githubusercontent.com/887496/150675621-f6ae9652-6f0a-41fa-a0e9-3f0e39a1cd0a.png)

If I understand e.g. #88 correctly then path variables and registry keys are updated on update. That's fine and a good beginning, however, insufficient in some use cases. For instance [Maven Toolchains](https://maven.apache.org/guides/mini/guide-using-toolchains.html) are an optional, manual setup that tell Maven where to find major versions of JDKs that a user has installed. The paths are essentially hardcoded in the declaration file. So if I want my toolchains to always point to the latest JDK of a major release I'll manually have to update that after installation of the patch version.

I therefore propose to shorten the default installation path of Adoptium to the major version only, e.g. `C:\Program Files\Eclipse Adoptium\jdk-11.0.14.9-hotspot` becomes `C:\Program Files\Eclipse Adoptium\jdk-11-hotspot`. This would also align with macOS for example where the path is usually `/Library/Java/JavaVirtualMachines/temurin-11.jdk`.

On linux the `.deb` path is also major release only:

```bash
$ update-java-alternatives -l
temurin-11-jdk-amd64 1111 /usr/lib/jvm/temurin-11-jdk-amd64
temurin-17-jdk-amd64 1161 /usr/lib/jvm/temurin-17-jdk-amd64
```

I guess this also relates to #352 in some way.

Contributor guide

Open the contributing guide

Research direction

Start by locating the Windows installer scripts that construct the Adoptium installation path and handle updates, environment variables, and registry keys. Compare the current version-specific behavior with the proposed major-version path, then verify how patch-level upgrades and existing installations should behave.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
release
Issue type
Feature
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.