Improve the outdated Java error message when syncing in idea.
parent
8238db1778
commit
640e1b4721
|
@ -29,10 +29,15 @@ public class LoomGradlePluginBootstrap implements Plugin<PluginAware> {
|
|||
if (!isValidJavaRuntime()) {
|
||||
errors.add(String.format("You are using an outdated version of Java (%s). Java %d or higher is required.", JavaVersion.current().getMajorVersion(), MIN_SUPPORTED_MAJOR_JAVA_VERSION));
|
||||
|
||||
String javaHome = System.getenv("JAVA_HOME");
|
||||
if (Boolean.getBoolean("idea.active")) {
|
||||
// Idea specific error
|
||||
errors.add("You can change the Java version in the Gradle settings dialog.");
|
||||
} else {
|
||||
String javaHome = System.getenv("JAVA_HOME");
|
||||
|
||||
if (javaHome != null) {
|
||||
errors.add(String.format("The JAVA_HOME environment variable is currently set to (%s).", javaHome));
|
||||
if (javaHome != null) {
|
||||
errors.add(String.format("The JAVA_HOME environment variable is currently set to (%s).", javaHome));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue