CLI: report error if kotlinc is invoked on Java 6 or 7
#KT-17297 Fixed
This commit is contained in:
@@ -32,6 +32,13 @@ public class Preloader {
|
||||
public static final int DEFAULT_CLASS_NUMBER_ESTIMATE = 4096;
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
String javaVersion = System.getProperty("java.specification.version");
|
||||
if (javaVersion.equals("1.6") || javaVersion.equals("1.7")) {
|
||||
System.err.println("error: running the Kotlin compiler under Java " + javaVersion + " is not supported. " +
|
||||
"Java 1.8 or later is required");
|
||||
System.exit(1);
|
||||
}
|
||||
|
||||
try {
|
||||
run(args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user