import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.lang.reflect.Constructor;
+import java.net.URL;
import java.util.*;
import javax.swing.*;
java.lang.reflect.Method setvar = gbindingc.getMethod("setVariable", new Class[] { String.class, Object.class} );
setvar.invoke(gbinding, new Object[] { "Jalview", jalviewContext});
Class gsec = cl.loadClass("groovy.util.GroovyScriptEngine");
- Constructor gseccons = gsec.getConstructor(new Class[] { String[].class });
- Object gse = gseccons.newInstance(new Object[] { new String[] { sfile.toURL().toString() } });
+ Constructor gseccons = gsec.getConstructor(new Class[] { URL[].class } ); // String[].class });
+ Object gse = gseccons.newInstance(new Object[] { new URL[] { sfile.toURL() } }); // .toString() } });
java.lang.reflect.Method run = gsec.getMethod("run", new Class[]{ String.class, gbindingc });
- run.invoke(gse, new Object[] { sfile.toURL().toString(), gbinding });
+ run.invoke(gse, new Object[] { sfile.getName(), gbinding });
success = true;
} catch (Exception e)
{