From: <bc...@wo...> - 2001-11-09 15:35:50
|
[John Goerzen] >Hi, > >Today I tried to use jythonc to compile some code that subclassed one >of my own Java classes. This was code that was supposed to be called >by Java. > >jythonc refused to recognize that this class was a subclass of the >Java one, repeatedly. Finally I tried saying it was a subclass of >java.lang.Date -- voila -- it worked. So I tried to find out why. > >Apparently, the problem was that one of the classes that the base >class needed was not on the CLASSPATH. jythonc did not so much as >even issue a warning when it should have issued an error. It took me >hours to track this down rather than 5 minutes it should have. >Running the script with jython finally made the error clear right >away. > >Can we get some error checking in jythonc? This is actually by design. Maybe it was a bad design, but it is not a bug. jythonc also support a mode where the python sources are compiled but the proxy classes is created at runtime when needed. So if a superclass cannot be found at compile time, we just wait and see if it is available at runtime instead and then create the proxy dynamicly. The trick to happy use of jythonc is *ALWAYS* to look in the output for lines likes: Creating .java files: MyApplet extends java.applet.Applet regards, finn |