Windows Installer: Provide reliable installation path
- 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:

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
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