Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Xamarin.Android.Tools.AndroidSdk] JdkInfo + JDK11 + Windows #88

Merged
merged 1 commit into from
Jun 4, 2020

Conversation

jonpryor
Copy link
Member

@jonpryor jonpryor commented Jun 4, 2020

Context: dotnet/android#4567

Commit 36d7fee added support for JetBrains OpenJDK 11 detection on
macOS and Linux.

Lacking was Windows support for JetBrains OpenJDK 11, because of
course it has to be different.

In particular, OpenJDK 11 moves the jvm library for Windows.
We checked for it in {HomePath}\jre\**\jvm.dll or
{HomePath}\lib\**\jvm.dll, but neither of those exist. Instead,
OpenJDK 11 has jvm.dll in {HomePath}\bin\server\jvm.dll, which is
also the only .dll file in the .tar.gz which exports the symbol
JNI_CreateJavaVM.

Update JdkInfo so that it looks for {HomePath}\bin\server\jvm.dll
to populate JdkInfo.JdkJvmPath.

Context: dotnet/android#4567

Commit 36d7fee added support for JetBrains OpenJDK 11 detection on
macOS and Linux.

Lacking was *Windows* support for JetBrains OpenJDK 11, because of
course it has to be different.

In particular, OpenJDK 11 *moves the `jvm` library* for Windows.
We checked for it in `{HomePath}\jre\**\jvm.dll` or
`{HomePath}\lib\**\jvm.dll`, but neither of those exist.  Instead,
OpenJDK 11 has `jvm.dll` in `{HomePath}\bin\server\jvm.dll`, which is
also the only `.dll` file in the `.tar.gz` which exports the symbol
`JNI_CreateJavaVM`.

Update `JdkInfo` so that it looks for `{HomePath}\bin\server\jvm.dll`
to populate `JdkInfo.JdkJvmPath`.
@jonpryor jonpryor requested a review from grendello June 4, 2020 16:15
Copy link
Contributor

@grendello grendello left a comment

Choose a reason for hiding this comment

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

Works correctly on Debian

@jonpryor jonpryor merged commit 3974fc3 into master Jun 4, 2020
jonpryor added a commit that referenced this pull request Jun 4, 2020
Context: dotnet/android#4567

Commit 36d7fee added support for JetBrains OpenJDK 11 detection on
macOS and Linux.

Lacking was *Windows* support for JetBrains OpenJDK 11, because of
course it has to be different.

In particular, OpenJDK 11 *moves the `jvm` library* for Windows.
We checked for it in `{HomePath}\jre\**\jvm.dll` or
`{HomePath}\lib\**\jvm.dll`, but neither of those exist.  Instead,
OpenJDK 11 has `jvm.dll` in `{HomePath}\bin\server\jvm.dll`, which is
also the only `.dll` file in the `.tar.gz` which exports the symbol
`JNI_CreateJavaVM`.

Update `JdkInfo` so that it looks for `{HomePath}\bin\server\jvm.dll`
to populate `JdkInfo.JdkJvmPath`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants