diff --git a/bootstrap/src/main/java/net/fabricmc/loom/bootstrap/LoomGradlePluginBootstrap.java b/bootstrap/src/main/java/net/fabricmc/loom/bootstrap/LoomGradlePluginBootstrap.java index 66408ed..5476293 100644 --- a/bootstrap/src/main/java/net/fabricmc/loom/bootstrap/LoomGradlePluginBootstrap.java +++ b/bootstrap/src/main/java/net/fabricmc/loom/bootstrap/LoomGradlePluginBootstrap.java @@ -29,10 +29,15 @@ public class LoomGradlePluginBootstrap implements Plugin { 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)); + } } }