adoptium / adoptium/installer

Provide a reliable AdoptOpenJDK Registry Key for Windows

Open
#167 5 comments 0 reactions 1 assignee Claimed by @gdams View on GitHub
enhancement
Dominant language
Jinja
Stars
168
Forks
77
Avg merge
2d 14h
Merged PRs (30d)
12

Description

Add a reliable registry key to find (so we can 'prefer' AdoptOpenJDK) on Windows.

FYI - When you run one of CL our windows installers there is a checkbox to say use Oracle registry keys (since a lot of software relies on that). I think we should write an equivalent reliable AdoptOpenJDK key if you don't select Oracle (or write one regardless of whether you do or not).

So far the only semi-reliable key we’ve found is:
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\AdoptOpenJDK.jarfile\shell\open\command
1h
Tres Finocchiaro This points to:
@="\"C:\\Program Files\\AdoptOpenJDK\\jdk-11.0.4.11-hotspot\\bin\\javaw.exe\" -jar \"%1\" %*"
Which can then be exploded into parts that would allude to the JDK home.

There are other keys that are registered at install time but contain hard-coded version information into the paths, making them hard to reliably locate. (edited)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.