Skip to content

Commit 0c954a5

Browse files
committed
Check java version at start.
1 parent 36beb74 commit 0c954a5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/src/dotty/tools/dotc/config/CompilerCommand.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ object CompilerCommand extends DotClass {
115115
else if (settings.version.value) {
116116
ctx.echo(versionMsg)
117117
Nil
118+
} else if (!Properties.isJavaAtLeast("1.8")) {
119+
ctx.error("Dotty requires Java 8 or newer to run")
120+
Nil
118121
}
119122
else if (shouldStopWithInfo) {
120123
ctx.echo(infoMessage)

0 commit comments

Comments
 (0)