Skip to content

Commit

Permalink
Nicer error message when running the tests with a JRE (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
raboof authored and SethTisue committed Nov 5, 2019
1 parent dfbef61 commit a6d9f37
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ import scala.collection.JavaConverters._
class JavaCompiler {

private val compiler = ToolProvider.getSystemJavaCompiler()
if (compiler == null)
throw new IllegalStateException(
s"No compiler found - please run the tests with a JDK, not just a JRE (${System.getProperties.get("java.home")})"
)

val target = IO.tempDir("java-classes")

Expand Down

0 comments on commit a6d9f37

Please sign in to comment.