Skip to content

Commit a6d9f37

Browse files
raboofSethTisue
authored andcommitted
Nicer error message when running the tests with a JRE (#211)
1 parent dfbef61 commit a6d9f37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: src/test/scala/com/typesafe/genjavadoc/util/JavaCompiler.scala

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ import scala.collection.JavaConverters._
99
class JavaCompiler {
1010

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

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

0 commit comments

Comments
 (0)