From 5ae1db43efa0014c355f642e60c1a69b7811110c Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Thu, 14 Sep 2023 15:08:17 +0200 Subject: [PATCH] enforcing java11 target and source for generated code for parsers --- src/org/rascalmpl/interpreter/utils/JavaBridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/org/rascalmpl/interpreter/utils/JavaBridge.java b/src/org/rascalmpl/interpreter/utils/JavaBridge.java index 5fd0e0c694..201703578f 100644 --- a/src/org/rascalmpl/interpreter/utils/JavaBridge.java +++ b/src/org/rascalmpl/interpreter/utils/JavaBridge.java @@ -120,7 +120,7 @@ public void compileJava(ISourceLocation loc, String className, String source, Ou public Class compileJava(ISourceLocation loc, String className, Class parent, String source) { try { // watch out, if you start sharing this compiler, classes will not be able to reload - List commandline = Arrays.asList(new String[] {"-proc:none", "-cp", config.getRascalJavaClassPathProperty()}); + List commandline = Arrays.asList(new String[] {"-proc:none", "--release", "11", "-cp", config.getRascalJavaClassPathProperty()}); JavaCompiler javaCompiler = new JavaCompiler(parent.getClassLoader(), null, commandline); Class result = javaCompiler.compile(className, source, null, Object.class); return result;