From eb9b66b1c97f2b889b2dfa909cc24e7e94137c73 Mon Sep 17 00:00:00 2001 From: Adam Valenta Date: Wed, 24 Apr 2024 12:56:06 +0200 Subject: [PATCH] fix java c on windows --- gradle/javaIgnoreSymbolFile.gradle | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gradle/javaIgnoreSymbolFile.gradle b/gradle/javaIgnoreSymbolFile.gradle index c88b8fe1b21e..21690a8b93a8 100644 --- a/gradle/javaIgnoreSymbolFile.gradle +++ b/gradle/javaIgnoreSymbolFile.gradle @@ -1,9 +1,14 @@ +import org.apache.tools.ant.taskdefs.condition.Os + compileJava { // This only works when forking and passing 'javac' as an executable options.compilerArgs << '-XDignore.symbol.file' options.fork = true if (System.env.JAVA_HOME != null) { - options.forkOptions.executable = "${System.env.JAVA_HOME}/bin/javac" + if (Os.isFamily(Os.FAMILY_WINDOWS)) + options.forkOptions.executable = "${System.env.JAVA_HOME}/bin/javac.exe" + else + options.forkOptions.executable = "${System.env.JAVA_HOME}/bin/javac" } else { // JAVA_HOME is not set. Using expected javac location options.forkOptions.executable = "/usr/bin/javac"