Skip to content

Conversation

@jonpryor
Copy link
Contributor

@jonpryor jonpryor commented Jun 4, 2020

Context: dotnet/android#4567
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3781637&view=logs&j=aacb7678-d5ef-5d73-dd2c-3def32e966f3&t=36563657-e889-567e-4d1d-090ca934735a

We're trying to get our CI to use JDK11 (dotnet/android#4567),
for which we added support for a JI_JAVA_HOME environment variable
"override"; see 13cc497.

However, even with JI_JAVA_HOME set, nuget restore still fails:

…\Xamarin.Android.Tooling.targets(65,5): warning XA5300: Not a valid JDK directory: `C:\Users\dlab14\android-toolchain\jdk`; via locator: $JI_JAVA_HOME

The question is why it's an invalid JDK directory. (It certainly
looks like it should be valid!)

While we do print out the contents of e.ToString(), this is only
written as "verbose" output, which isn't captured by nuget restore.
As such, we have no idea why the JDK directory is not considered valid.

Update the warning message that Java.Interop emits when checking JDK
locations so that it includes Exception.Message, e.g.

The directory `/invalid`, via locator `$JI_JAVA_HOME`, is not a valid JDK directory: Not a directory

This will hopefully provide enough detail to let us know why it's
failing.

Context: dotnet/android#4567
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3781637&view=logs&j=aacb7678-d5ef-5d73-dd2c-3def32e966f3&t=36563657-e889-567e-4d1d-090ca934735a

We're trying to get our CI to use JDK11 (dotnet/android#4567),
for which we added support for a `JI_JAVA_HOME` environment variable
"override"; see 13cc497.

However, even with `JI_JAVA_HOME` set, `nuget restore` still fails:

	…\Xamarin.Android.Tooling.targets(65,5): warning XA5300: Not a valid JDK directory: `C:\Users\dlab14\android-toolchain\jdk`; via locator: $JI_JAVA_HOME

The question is *why* it's an invalid JDK directory.  (It certainly
looks like it should be valid!)

While we *do* print out the contents of `e.ToString()`, this is only
written as "verbose" output, which isn't captured by `nuget restore`.
As such, we have no idea why the JDK directory is not considered valid.

Update the warning message that Java.Interop emits when checking JDK
locations so that it includes `Exception.Message`, e.g.

	The directory `/invalid`, via locator `$JI_JAVA_HOME`, is not a valid JDK directory: Not a directory

This will hopefully provide enough detail to let us know why it's
failing.
@jonpryor jonpryor merged commit 5552b07 into dotnet:master Jun 4, 2020
jonpryor added a commit that referenced this pull request Jun 4, 2020
Context: dotnet/android#4567
Context: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3781637&view=logs&j=aacb7678-d5ef-5d73-dd2c-3def32e966f3&t=36563657-e889-567e-4d1d-090ca934735a

We're trying to get our CI to use JDK11 (dotnet/android#4567),
for which we added support for a `JI_JAVA_HOME` environment variable
"override"; see 13cc497.

However, even with `JI_JAVA_HOME` set, `nuget restore` still fails:

	…\Xamarin.Android.Tooling.targets(65,5): warning XA5300: Not a valid JDK directory: `C:\Users\dlab14\android-toolchain\jdk`; via locator: $JI_JAVA_HOME

The question is *why* it's an invalid JDK directory.  (It certainly
looks like it should be valid!)

While we *do* print out the contents of `e.ToString()`, this is only
written as "verbose" output, which isn't captured by `nuget restore`.
As such, we have no idea why the JDK directory is not considered valid.

Update the warning message that Java.Interop emits when checking JDK
locations so that it includes `Exception.Message`, e.g.

	The directory `/invalid`, via locator `$JI_JAVA_HOME`, is not a valid JDK directory: Not a directory

This will hopefully provide enough detail to let us know why it's
failing.
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.

2 participants