From: Syver E. <syv...@on...> - 2002-02-05 00:36:01
|
James Sleeman <bit...@ph...> writes: > Hi all, > firstly, I'm a newbie to both jython and pretty much to java in > general (I've done a couple jobs in java, but nothing to write home > about), I can recommend you get New Riders jython book. It goes through why things like this happens really thoroughly and has been a lot of help to me, in clearing these kinds of problems and understanding why they happen. Of the top of my head I can suggest, compiling your applet with the --jar --core --deep options. Your .py file must have the same name as your class, and watch out for the message from jythonc that your python class is extending the java class, JApplet in your case. If jythonc doesn't say this you got something wrong, imports or classpath problems maybe. It's good to remember that jythonc compilation is nothing like ordinary java compilation so don't count on really basic errors being flagged just because it compiles. Be aware that you can specify more than one jar file in your applet tag. Like this: archive="jarnumberone.jar , jarnumbertwo.jar" This way you don't have to put all the files into the same jar. Alas I have heard that this doesn't work with all browsers. It works on IE 6.0 which is what I have tested with. > so my problem might just be something I'm doing wrong. Probably yes. The class cast exception in your traceback indicates that your jython class doesn't extend the class you think it extends see above. Hope this helps. -- Vennlig hilsen Syver Enstad |