We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88cc5e0 commit 728f372Copy full SHA for 728f372
src/main/scala/com/sourcegraph/sbtsourcegraph/Versions.scala
@@ -79,10 +79,16 @@ object Versions {
79
case Some(javaHome) =>
80
val sb = new StringBuilder
81
val proc = {
82
+ val cmd =
83
+ if (scala.util.Properties.isWin)
84
+ Paths.get("bin", "javac.exe")
85
+ else Paths.get("bin", "javac")
86
+
87
val stdout = scala.sys.process
- .Process(Seq("javac", "-version"), cwd = javaHome)
88
+ .Process(Seq(cmd.toString(), "-version"), cwd = javaHome)
89
.!!(ProcessLogger(sb.append(_)))
90
.trim
91
92
// Java 8 sends output to stderr...
93
if (stdout.isEmpty()) sb.result().trim else stdout
94
}
0 commit comments