From: Noel R. <no...@ya...> - 2002-03-05 17:48:07
|
At 02:05 PM 3/4/02, you wrote: >I'm interested in learning more about how jythonc works. I see that it >produces an intermediate file which is then compiled to bytecode with javac. > >A few questions come to mind: > >Did the creators consider using Java as an intermediate, rather than >generating bytecode directly (OK, Java source code is easier to produce, >but isn't it possible to compile non-Java directly to bytecode?) The jython interpreter does generate bytecode directly and on-the-fly. However, to capture the full dynamic range of jython behavior (things like module reloading, the exec statement, and the like), jython uses a custom ClassLoader in the interpreter. Since jythonc is supposed to allow you to use jython in places where an actual .class or .jar file is required, and where a custom ClassLoader might violate security, jythonc creates actual Java source. As a result, jythonc is a little stricter about Java subclassing, and may also have trouble with dynamic things like generating a base class at run-time. >More generally: Is there any documentation available about how jythonc works? <shameless plug> The forthcoming _Java Essentials_ from O'Reilly has a chapter about jythonc, mostly from a user perspective, but also containing information about how it works and the generated Java source. </shameless plug> Hope this helps, Noel Rappin _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com |