This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow java.home to be overriden with androidide.java.home
- Loading branch information
Showing
5 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/jdk.compiler/share/classes/com/sun/tools/javac/util/JavaHomeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.sun.tools.javac.util; | ||
|
||
public class JavaHomeProvider { | ||
|
||
public static String PROP_ANDROIDIDE_JAVA_HOME = "androidide.java.home"; | ||
|
||
public static String getJavaHome() { | ||
String javaHome = System.getProperty(PROP_ANDROIDIDE_JAVA_HOME); | ||
if (javaHome == null || javaHome.trim().length() == 0) { | ||
javaHome = System.getProperty("java.home"); | ||
} | ||
|
||
return javaHome; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters