We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 535760d commit 865edafCopy full SHA for 865edaf
src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java
@@ -160,6 +160,16 @@ public Object eval(Reader reader) throws ScriptException {
160
return null;
161
}
162
163
+ /**
164
+ * Compiles and runs the specified {@code .java} class.
165
+ *
166
+ * @param script the source code for a Java class
167
+ * @return the compiled Java class as {@link Class}.
168
+ */
169
+ public Class<?> compile(String script) throws ScriptException {
170
+ return compile(new StringReader(script));
171
+ }
172
+
173
/**
174
* Compiles and runs the specified {@code .java} class.
175
*
0 commit comments