From: Brian Z. <bri...@ya...> - 2001-08-23 17:35:00
|
Hi all, About two months ago I experimented with jython on WinCE/iPaq and had some success, now VAME (IBM visual age micro edition) has released 1.4 (== 1.3.0 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 the classpath option does not work, I have to work around by using a 9M extracted .class tree. Here's the updated instruction: 1. download from http://www.embedded.oti.com/ "runtime for ARM PocketPC" and "custom config" 2. install the runtime, extract the zip file and copy to pocketpc under \vame1.4 3. install the "custom config", copy lib\jclMax to pocketpc \vame1.4\lib 4. download jython2.1a3 from http://www.jython.org , copy \jython-2.1a3 to pocketpc \jython-2.1a3 5. extract lib\jclMax\classes.zip and copy all subdir/files to pocketpc \vame1.4\lib\classes 6. create a shortcut RunJython.lnk using the following 4 lines concated (on a single line seperated by " ") on your desktop PC and copy it to your pocketpc (-cp:classpath, -bp:bootstrap): 132#"\vame1.4\j9.exe" "-bp:\vame1.4\lib\jclMax\classes.zip" "-cp:\vame1.4\lib\classes;\jython-2.1a1\jython.jar" "org.python.util.jython" Here's the part I hope someone can give me some insight, I want to know why classes.zip cannot be in classpath: 1. If I leave the classpath as "-cp:\jython-2.1a1\jython.jar", I can launch jython fine, do all the python stuff, while "import java" shows "no module named java" 2. If I use "-cp:\vame1.4\lib\jclMax\classes.zip;\jython-2.1a1\jython.jar", I got error message: *sys-package-mgr*: processing new jar, '\vame1.4\lib\jclMax\classes.zip' java.lang.IndexOutOfBoundsException 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 org/python/core/CachedJarsPackageManager.addZipEntry(Ljava/util/Hashtable;Lj ava/util/zip/ZipEntry;Ljava/util/zip/ZipInputStream;)V org/python/core/CachedJarsPackageManager.getZipPackages(Ljava/io/InputStream ;)Ljava/util/Hashtable; org/python/core/CachedJarsPackageManager.addJarToPackages(Ljava/net/URL;Ljav a/io/File;Z)V org/python/core/CachedJarsPackageManager.addJarToPackages(Ljava/io/File;Z)V org/python/core/PathPackageManager.addClassPath(Ljava/lang/String;)V org/python/core/SysPackageManager.findAllPackages(Ljava/util/Properties;)V org/python/core/SysPackageManager.<init>(Ljava/io/File;Ljava/util/Properties ;)V org/python/core/PySystemState.initPackages(Ljava/util/Properties;)V org/python/core/PySystemState.initialize(Ljava/util/Properties;Ljava/util/Pr operties;[Ljava/lang/String;Ljava/lang/ClassLoader;)V org/python/core/PySystemState.initialize(Ljava/util/Properties;Ljava/util/Pr operties;[Ljava/lang/String;)V org/python/util/jython.main([Ljava/lang/String;)V 3. As mentioned, extract classes.zip to directory and add directory to -cp works fine. 4. I also tried to jar classes/ directory into a classes.jar but that caused jython to complain "skip bad jar" Anyone has any idea the cause, or what to do further? I mean it works ok right now, except I have to live with this 9M .class tree on a handheld. Thanks for any help or suggestions, -Brian |