But a few observations and questions:
1. I saw entries like
in the pre-indexed jython.jar, does that mean this jython.jar is
bootstrap classes specific? Can I use the same jython.jar for Sun Personal
Java for WinCE/ARM?
2. I'm thinking about document all this, but will this pre-index feature be
in the next release?
3. The previous pystone boost was not by VAME 1.4 upgrade. Using pre-indexed
jython.jar pystone falls back to 48-49. It was more because I happened to
extract the classes.zip into a directory. This also indicates pre-index in
the jar has some overhead.
4. "import re" throws StackOverflownError while "import _sre" works.
Attached is the stack trace.
Thanks for the great work!
----- Original Message -----
From: "Finn Bock" <bckfnn@...>
Sent: Friday, August 24, 2001 1:00 PM
Subject: Re: [Jython-users] jython on WinCE/iPaq update
> [Brian Zhou]
> >Hi all,
> >About two months ago I experimented with jython on WinCE/iPaq and had
> >success, now VAME (IBM visual age micro edition) has released 1.4 (==
> >jvm), so I tried the new version.
> >Good news is I don't have to copy Sun's rt.jar, and pystone shows an
> >improvement from 48 to 52. But adding \vame1.4\lib\jclMax\classes.zip to
> >classpath option does not work, I have to work around by using a 9M
> >extracted .class tree.
> >Here's the updated instruction:
> Sounds like a good candidate for a faq entry:
> 2.7 How do I install jython on my iPAQ
> >Here's the part I hope someone can give me some insight, I want to know
> >classes.zip cannot be in classpath:
> >1. If I leave the classpath as "-cp:\jython-2.1a1\jython.jar", I can
> >jython fine, do all the python stuff, while "import java" shows "no
> >named java"
> >2. If I use
> >I got error message:
> >*sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip'
> >Stack trace:
> > java/lang/Throwable.<init>()V
> > java/lang/Throwable.<init>(Ljava/lang/String;)V
> > java/lang/IndexOutOfBoundsException.<init>(Ljava/lang/String;)V
> > java/util/zip/ZipInputStream.read([BII)I
> > java/util/zip/ZipInputStream.skip(J)J
> > java/io/DataInputStream.skipBytes(I)I
> > org/python/core/PackageManager.checkAccess(Ljava/io/InputStream;)I
> > ...
> I find the stacktrace curious. Totally unrelated to the problem you are
> having, but when a skip() call can cause a IOOB (perhaps because a
> over/underflow of the temporary buffer allocated by skip) then
> ZipInputStream are having serious internal problems. Perhaps OTI can be
> convinced to take a closer look at the IOOB exception.
> >3. As mentioned, extract classes.zip to directory and add directory
> >works fine.
> >4. I also tried to jar classes/ directory into a classes.jar but that
> >jython to complain "skip bad jar"
> >Anyone has any idea the cause, or what to do further?
> As the OTI guy said, putting classes.zip on -cp isn't the solution (even
> if it didn't throw a IOOB).
> I have made a very experimental feature that allow a tool (running under
> java2 on windows or unix) to pre-index a zip/jar file. The pre-index is
> then stored inside the zip file.
> If you want to try it out (and I really think you should because it
> fixes the problems you are having with this) you will have to apply a
> patch to SysPackageManager.java and install a new source file in
> When you have compiled the changes to jython, you run the indexer tool
> like this:
> java org.python.util.jythonjar -usecp -cp classes.zip jython.jar
> After this the jython.jar file is updated with a lot of entries called
> These entries will be used when the cache dir doesn't contain entries
> for the packages. As a result classes.zip doesn't need to be on the -cp.
> Jython-users mailing list