Note: Finn Bock tells me that the Mac patch is included in the upcoming Jython 2.1. I'll keep this page around, however, until Jython 2.1 is officially released (it's currently in alpha testing).
has a bug that causes trouble when running Java bytecode that was
compiled from Jython sources. Specifically, the MRJ terminates with
TypeError when it attempts to assign values to
bean properties such as
keyTyped (this problem does not occur when Jython sources
are being run with the Jython interpreter).
I have reported this bug to Apple (bug ID #2656645), so there's a
chance it'll be fixed in the future. For the time being, you can use
a patch. The easiest way to install the
patch is to replace your current
jython.jar by the patched
If you are comfortable compiling Jython sources and rebuilding your
installation of Jython, then you can replace the source file
org/python/core/PyJavaClass.java by the patched
If you cannot patch your installation of Jython, you can download the
.jar files by typing
jar uf foo.jar org/python/core/PyJavaClass.class after you've
foo.jar with jythonc
--deep --core --jar foo.jar .... This is also the way to go if you
want to run the precompiled demos that come with the distribution of
Finally, you can pull the patched
CVS repository and install it.
PyJavaClass.java was downloaded from the CVS
repository on March 06, 2001.
Finn Bock and I worked together to isolate the bug in Apple's MRJ after I encountered difficulties running compiled Jython code on Macs. Finn (with a little bit of input from my side) found the workaround included in the patch.