executing the below code snippet in jython: gcc version 4.0.1 20050508 (prerelease) (Debian 4.0.0-6) Jython 2.1 import javax.swing as swing win = swing.JFrame("JYTHON") win.size = (100, 100) win.show() and closing the window from the window manager results in the following: (.:29481): GLib-GObject-WARNING **: invalid uninstantiatable type `<invalid>' in cast to `GtkWidget' (.:29481): Gtk-CRITICAL **: gtk_widget_hide: assertion `GTK_IS_WIDGET (widget)' failed Seems that the frames peer widget is destroyed. This - closing the window from the window manager, nad showing again - works with sun jdk 1.5_03.
I tried to run this under JamVM+Classpath: $ jamvm -Dpython.home="/home/fitzsim/jython-2.1" -classpath "/home/fitzsim/jython-2.1/jython.jar" "org.python.util.jython" Jython 2.1 on java1.4.2 (JIT: ) >>> import javax.swing as swing Traceback (innermost last): File "<console>", line 1, in ? ImportError: no module named javax >>> Any idea what I'm missing?
(In reply to comment #1) > I tried to run this under JamVM+Classpath: > > $ jamvm -Dpython.home="/home/fitzsim/jython-2.1" -classpath > "/home/fitzsim/jython-2.1/jython.jar" "org.python.util.jython" > Jython 2.1 on java1.4.2 (JIT: ) > >>> import javax.swing as swing > Traceback (innermost last): > File "<console>", line 1, in ? > ImportError: no module named javax > >>> > > Any idea what I'm missing? > Seems that jython cant make its cache directory - try adding something like this: -Dpython.cachedir="/tmp" Seems that this is not enough on my ubuntu machine and i have to add rt.jar to the classpath. I managed to fire up jamvm with the following: jamvm -Dpython.cachedir="/tmp" -Dpython.home="/usr/lib/python2.1" -classpath "/usr/share/java/jython.jar:/usr/lib/jvm/java-gcj/jre/lib/rt.jar" "org.python.util.jython" Jython 2.1 on java1.4.2 (JIT: ) >>> import javax.swing >>>
I can't reproduce this on Classpath CVS HEAD. Resolving as fixed.