git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c539b2d
)
allow groovy scripts to be run when in headless mode - pass startupAlFrame as context
author
jprocter
<Jim Procter>
Thu, 7 Apr 2011 22:18:22 +0000
(22:18 +0000)
committer
jprocter
<Jim Procter>
Thu, 7 Apr 2011 22:18:22 +0000
(22:18 +0000)
src/jalview/bin/Jalview.java
patch
|
blob
|
history
diff --git
a/src/jalview/bin/Jalview.java
b/src/jalview/bin/Jalview.java
index
ba2d3bd
..
80f3722
100755
(executable)
--- a/
src/jalview/bin/Jalview.java
+++ b/
src/jalview/bin/Jalview.java
@@
-670,7
+670,7
@@
public class Jalview
* = new Binding(); binding.setVariable("input", "world");
* gse.run("hello.groovy", binding); </code>
*/
* = new Binding(); binding.setVariable("input", "world");
* gse.run("hello.groovy", binding); </code>
*/
- ClassLoader cl = jalviewContext.getClass().getClassLoader();
+ ClassLoader cl = (jalviewContext[0]!=null ? jalviewContext[0] : jalviewContext[1]).getClass().getClassLoader();
Class gbindingc = cl.loadClass("groovy.lang.Binding");
Constructor gbcons = gbindingc.getConstructor(null);
Object gbinding = gbcons.newInstance(null);
Class gbindingc = cl.loadClass("groovy.lang.Binding");
Constructor gbcons = gbindingc.getConstructor(null);
Object gbinding = gbcons.newInstance(null);