|
From: HEINECKE J. FTRD/DMI/L. <joh...@rd...> - 2001-06-05 15:44:44
|
Hi,
I try to use a python-class (jythonc-ized)
in java. It worked fine until I added three arguments to the class.
Obviously I forget some initialization, but I cannot find the error:
Python (translated with jythonc):
import java
import HTool
class jHLP(java.lang.Object):
def __init__(self, lex, gramm, ont): # this crashes
"@sig public jHLP(java.lang.String lex, java.lang.String gramm,
java.lang.String ont)"
print "===%s---%s===%s---" % (lex, gramm, ont)
self.pa = HTool.HTool(lex, gramm, ont)
#def __init(self): # this worked
#self.pa = HTool.HTool("l.bin", "g.bin", "o.bin")
def doit(self, inputstring):
"@sig public java.lang.String doit(java.lang.String inputstring)"
OFs = self.pa.runappli(inputstring)
return string.join(OFs, "#")
Java:
import java.io.*;
import java.net.*;
import jHLP;
public class FTRDHLP {
String lex = "l.bin";
String gramm = "g.bin";
String onto = "o.bin";
jHLP hpa = new jHLP(lex, gramm, onto); // this crashes
//jHLP hpa = new jHLP(); // this worked
...
}
The question is, who can I give some arguments to a Class init?
Thank you very much for any hints!
Johannes
--
Johannes Heinecke
Email: joh...@fr...
|