From: <bc...@wo...> - 2001-05-28 19:41:32
|
On Mon, 14 May 2001 22:41:31 -0300, you wrote: >Hello folks, > >I recently succeded in running JPython 1.1 over Kaffe 1.0.6. >Soon after that I realised JPython was defunct, then I turned >to Jython 2.1.a1. It loads the intrepreter almost without >complain (it complains about some jars in my CLASSPATH) Can you verify if these two .jar files are valid? This is best done by running the jar utility (if any) that comes with kaffe. >and it does not print copyright notice ??? In jython-2.0 the copyright notice consists of the line: Type "copyright", "credits" or "license" for more information. and that is only printed when the site.py file have been executed. >Moreover, import java fails with: > >$ jython >*sys-package-mgr*: processing modified jar, >'/home/rodrigo/Tese/work/lib/gnu-regexp-1.1.0.jar' >*sys-package-mgr*: skipping bad jar, >'/home/rodrigo/Tese/work/lib/gnu-regexp-1.1.0.jar' >*sys-package-mgr*: processing modified jar, >'/usr/share/mysql/mm.mysql.jdbc-2.0pre5/mysql_both_comp.jar' >*sys-package-mgr*: skipping bad jar, >'/usr/share/mysql/mm.mysql.jdbc-2.0pre5/mysql_both_comp.jar' >Jython 2.1a1 on java1.0.6-20010401 (JIT: kaffe.jit) > >>> import java >Traceback (innermost last): > File "<console>", line 1, in ? >ImportError: no module named java How does kaffe find its system classes (whatever corresponds to rt.jar in jdk1.3)? By default Jython will look for classes & jars on: - the directories listed in the system-properties "java.class.path" and "sun.boot.class.path". The values of these two properties will be interpreted as a CLASSPATH string. - All the .jar/.zip files found in the directories listed on the property "java.ext.dirs". As an example, jython finds the JDK1.3 rt.jar file by looking at the sun.boot.class.path property: Jython 2.1a1 on java1.3.0 (JIT: null) Type "copyright", "credits" or "license" for more information. >>> import java >>> print java.lang.System.getProperty("sun.boot.class.path") I:\JAVA\JDK1.3\jre\lib\rt.jar;I:\JAVA\JDK1.3\jre\lib\i18n.jar;I:\JAVA\JDK1.3\jre \lib\sunrsasign.jar;I:\JAVA\JDK1.3\jre\classes To enable better support for kaffe, first try to see if any of the kaffe system properties correspond to sun.boot.class.path. If there is such a property you can configure jython to use by inserting a line in the registry file: python.packages.paths=java.class.path,sun.boot.class.path,kaffe.boot.class.path If something along these lines works, we can easily add the kaffe support to jython. regards, finn |