Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

[Xamarin.Android.Tools.AndroidSdk] Probe for Microsoft OpenJDK dirs - #113

Merged
jonpryor merged 1 commit into
dotnet:mainfrom
jonpryor:jonp-check-msjdk-dirs
Mar 24, 2021
Merged

[Xamarin.Android.Tools.AndroidSdk] Probe for Microsoft OpenJDK dirs#113
jonpryor merged 1 commit into
dotnet:mainfrom
jonpryor:jonp-check-msjdk-dirs

Conversation

@jonpryor

Copy link
Copy Markdown
Contributor

No description provided.

@jonpryor
jonpryor requested a review from tondatMarch 19, 2021 02:05
@jonpryor
jonpryorforce-pushed the jonp-check-msjdk-dirs branch from cb01ba5 to 01ed56bCompareMarch 19, 2021 02:06

static IEnumerable<string> GetMacOSMicrosoftOpenJdkPaths ()
{
var jdk = AppDomain.CurrentDomain.GetData ($"GetMacOSMicrosoftOpenJdkPath override! {typeof (JdkInfo).AssemblyQualifiedName}")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: spacing

Comment threadsrc/Xamarin.Android.Tools.AndroidSdk/JdkInfo.cs Outdated
@jonpryor
jonpryorforce-pushed the jonp-check-msjdk-dirs branch 6 times, most recently from 2a32fd3 to 1a29cf3CompareMarch 24, 2021 18:38

// https://docs.microsoft.com/en-us/windows/win32/api/winreg/nf-winreg-regenumkeyexw
[DllImport (ADVAPI, CharSet = CharSet.Unicode, SetLastError = true)]
static extern int RegEnumKeyExW (

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the need for p/invoke here? Is it an issue with 32-bit processes reading 64-bit keys?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure of the original need; this code never used Microsoft.Win32.Registry & co, and I'm not sure why. (Apparently a question for @mhutch?)

Thus, given that we're already a tangled mess of P/Invokes, I figured it "best" to continue with the current paradigm.

Comment threadsrc/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs Outdated
Comment threadsrc/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkWindows.cs Outdated
@jonpryor
jonpryorforce-pushed the jonp-check-msjdk-dirs branch from 1a29cf3 to 4c041c8CompareMarch 24, 2021 21:11
Context: https://aka.ms/getopenjdk
Context: https://devblogs.microsoft.com/java
Remove support for the obsolete (and never updated)
`microsoft_dist_openjdk_*` builds of OpenJDK. Despite having
"microsoft" in the name, it was maintained by a different team which
has moved on to other things.
@jonpryor
jonpryorforce-pushed the jonp-check-msjdk-dirs branch from 4c041c8 to 21ea061CompareMarch 24, 2021 21:12
@jonpryor
jonpryor merged commit 237642c into dotnet:mainMar 24, 2021
@mhutch

Copy link
Copy Markdown

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@jonpryor@mhutch@grendello@jonathanpeppers@mcumming