applied copyright 2008
[jalview.git] / src / jalview / bin / Jalview.java
index faf98db..cf3ac30 100755 (executable)
@@ -1,17 +1,17 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer
- * Copyright (C) 2007 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
- *
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.4)
+ * Copyright (C) 2008 AM Waterhouse, J Procter, G Barton, M Clamp, S Searle
+ * 
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- *
+ * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- *
+ * 
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.io.PrintWriter;
 import java.lang.reflect.Constructor;
+import java.net.URL;
 import java.util.*;
 
 import javax.swing.*;
@@ -466,10 +467,10 @@ public class Jalview
         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)
     {