Package the desired class files on a build system without these restrictions (your development laptop for example). You may want to use compileall for this step; it's available as of 2.2, although I don't have experience using it. (But it should likely be just fine.)
This process is similar to how we target deployment to an app server. Many interesting packages now require setuptools, but this in turns uses functionality that most security managers do not allow (full posix support, which requires JNI). Dividing in two steps - setup (including building a WAR), then run under restrictions - circumvents this problem.
Thanks for your replies. Actually, I’m working with the configurable-proxies branch. I need static proxies to create understandable class files for the KVM. If I don’t and would write a customized Java file that complies and loads Jython and a script, everything (script + jython itself) MUST exist as compiled class files in ONE jar.
Now the problem is: I can’t use Jython (no ME) to create the class files because they don’t comply with 1.3. And I can’t use JythonME (supposing it would work) because in CLDC/MIDP I can’t write to files to create the class files plus CLDC is even more limited than CDC on what JythonME was built.
What about this “ancient” Jython compiler that creates class files. I guess, they are not self-contained in any way and still need jython? In that case, the first step would be to port Jython or maybe JyrhonME to CLDC and try to make it writing files.
Actually, Jim, you are right and mobile development does not need Jython 2.5>. Actually, we currently develop on a platform with build in Jython interpreter that runs Jython 1.5.2 without Float support J ! So, this would be basically enough! But as I explained, the tough part is to create CLDC/MIDP complying class files for both jython application as well as the jython libs that needs to be supported.