diff --git a/pom.xml b/pom.xml
index f3b9ce930b5..eab0ab9e17f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -125,7 +125,7 @@
rascal-maven-plugin
${rascal-maven.version}
- false
+ true
${project.build.outputDirectory}
${project.basedir}/src/org/rascalmpl/library
diff --git a/src/org/rascalmpl/interpreter/utils/JavaBridge.java b/src/org/rascalmpl/interpreter/utils/JavaBridge.java
index 0569e92c43b..fc0c079a853 100644
--- a/src/org/rascalmpl/interpreter/utils/JavaBridge.java
+++ b/src/org/rascalmpl/interpreter/utils/JavaBridge.java
@@ -15,6 +15,7 @@
*******************************************************************************/
package org.rascalmpl.interpreter.utils;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
@@ -30,6 +31,7 @@
import javax.tools.JavaFileObject;
import javax.tools.ToolProvider;
+import org.checkerframework.checker.units.qual.t;
import org.rascalmpl.ast.Expression;
import org.rascalmpl.ast.FunctionDeclaration;
import org.rascalmpl.ast.KeywordFormal;
@@ -107,6 +109,10 @@ public JavaBridge(List classLoaders, IValueFactory valueFactory, Co
public Class compileJava(ISourceLocation loc, String className, String source) {
return compileJava(loc, className, getClass(), source);
}
+
+ public void compileJava(ISourceLocation loc, String className, String source, OutputStream classBytes) {
+ compileJava(loc, className, getClass(), source, classBytes);
+ }
public Class compileJava(ISourceLocation loc, String className, Class> parent, String source) {
try {
@@ -130,6 +136,33 @@ public Class compileJava(ISourceLocation loc, String className, Class>
}
}
+ public Class> loadClass(InputStream in) throws IOException, ClassNotFoundException {
+ List commandline = Arrays.asList(new String[] {"-proc:none", "-cp", config.getRascalJavaClassPathProperty()});
+ JavaCompiler> javaCompiler = new JavaCompiler