The best way would be to use the Java compiler API (JSR 199) included with JDK 6.
Here is an article about using it with Jython:


On Tue, Sep 22, 2009 at 9:33 AM, Yaniv Vilnai <> wrote:

Hi ,
I'm trying to insert inline java code inside a jython 2.5.0 script.
I have found this script:
but it requires jythonc , and jython 2.5.0 doesn't have jythonc anymore.

Should i copy jythonc from jython 2.2  ? is it safe  ?

NO! Heaven forbid, the old jythonc is horrible beast from the past, and in the past is where it should stay.
Is there another way to do it ?

Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
Jython-users mailing list