Skip to content

Allow/use JAVA_HOME #1213

Closed
Closed
@jonpryor

Description

@jonpryor

The default xamarin-android build uses whatever java is in $PATH, that the manner to override this choice is ill-defined. Additionally, the default xamarin-android build artifacts (xabuild) will likewise use whatever java is in $PATH.

Unfortunately, on macOS it is rather "weird" to control the the default JDK which is used when more than one is installed, making the "use whatever java is in $PATH" behavior sub-optimal.

There is already a way to specify the JDK to use for app builds: $HOME/.config/xbuild/monodroid-config.xml contains a /monodroid/java-sdk/@path attribute which is the path to the JDK to use.

However, defaults matter, and the default is $PATH.

We should do something smarter here, so that when we encounter a machine with both JDK 1.8 and JDK 9 installed, we prefer JDK 8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions