From: Danny Y. <dy...@hk...> - 2001-11-19 23:35:58
|
Sorry, I had a few cut-n-paste errors. Here are some corrections: On Mon, 19 Nov 2001, Danny Yoo wrote: > > and I've compiled my Jython files into a single .jar file: > > ### The command I used was: ### [dyoo@tesuque bar]$ jythonc --jar test.jar Doubler.py Squarer.py ### > and wrote a small java test.java to see if everything worked. > > ### > [dyoo@tesuque bar]$ cat foo.java > public class foo { > static public void main(String[] args) { > EvalInterface f1 = new Square(); > System.out.println(f1.eval(42)); > EvalInterface f2 = new Double(); > System.out.println(f2.eval(42)); > } > } Wrong test file --- I meant: ### public class Test { static public void main(String[] args) { EvalInterface f1 = new Squarer(); System.out.println(f1.eval(42)); EvalInterface f2 = new Doubler(); System.out.println(f2.eval(42)); } } ### instead. (I had to rename my class from "Double" to "Doubler", since the name was conflicting with the java.lang.Double wrapper class.) Sorry about the typos! |