/[gzz]/gzz/gzz/control/Main.java
ViewVC logotype

Diff of /gzz/gzz/control/Main.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tuukkah, Mon Aug 26 19:07:15 2002 UTC revision 1.4 by tuukkah, Tue Aug 27 06:34:41 2002 UTC
# Line 4  package gzz.control; Line 4  package gzz.control;
4  import org.python.util.PythonInterpreter;  import org.python.util.PythonInterpreter;
5  import org.python.core.*;  import org.python.core.*;
6    
7    /** A wrapper class for starting Gzz.py from Java. This class can be used
8     *  as the main class in gzz.jar
9     */
10    
11  public class Main {  public class Main {
12      public static void main(String[] args) throws PyException {      public static void main(String[] args) throws PyException {
13          String[] pyargs = new String[args.length+1];          String[] pyargs = new String[args.length+1];
14          System.arraycopy(args, 0, pyargs, 1, args.length);          System.arraycopy(args, 0, pyargs, 1, args.length);
15          pyargs[0] = "Gzz.py";          pyargs[0] = "Gzz.py"; // sys.argv[0] is the command name
16            // Python search path will be the same as Java classpath
17          System.setProperty("python.path",          System.setProperty("python.path",
18                             System.getProperty("java.class.path"));                             System.getProperty("java.class.path"));
19          PythonInterpreter.initialize(System.getProperties(), null, pyargs);          PythonInterpreter.initialize(System.getProperties(), null, pyargs);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26