Skip to content

Commit 53a7a3e

Browse files
author
Mark Perry
committed
Add .exe to external javac 8 under windows
1 parent 9a0f847 commit 53a7a3e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

java8/build.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
import org.apache.tools.ant.taskdefs.condition.Os
3+
24
apply plugin: 'java'
35

46
apply from: "$rootDir/lib.gradle"
@@ -24,7 +26,8 @@ compileJava {
2426
if (jh == null) {
2527
throw new Exception("JAVA8_HOME environment variable not set")
2628
}
29+
def extension = Os.isFamily(Os.FAMILY_WINDOWS) ? ".exe" : ""
2730
options.fork = true
28-
options.forkOptions.executable = "$jh/bin/javac"
31+
options.forkOptions.executable = "$jh$extension/bin/javac"
2932
}
3033

0 commit comments

Comments
 (0)