From: D-Man <ds...@ri...> - 2001-04-10 15:12:50
|
I want to use jython to interactively test some Java work I did. Unfortunately for this situation, jython caches all jar information and skips any jar that is corrupt. My Java work consists of storing some information (license key) in a jar in the CLASSPATH. Of course, doing this (in the only way I could come up with) causes that particular file to be "corrupt" because it no longer matches the CRC checksum or the compression algorithm. This is acceptable because this file is never loaded by the JVM, but read directly by my code. When I want to test it with Jython, jython doesn't load the jar because it is "bad". As a result I don't get any of the classes that are defined in the jar. Is there a way to turn off jython's processing and caching of the jar's information so I can use this modified (err, hacked <wink>) jar? If not, I can write some Java code to run through some tests. Thanks, -D |
From: <bc...@wo...> - 2001-04-13 22:09:47
|
[D-Man] >I want to use jython to interactively test some Java work I did. >Unfortunately for this situation, jython caches all jar information >and skips any jar that is corrupt. My Java work consists of storing >some information (license key) in a jar in the CLASSPATH. Of course, >doing this (in the only way I could come up with) causes that >particular file to be "corrupt" because it no longer matches the CRC >checksum or the compression algorithm. This is acceptable because >this file is never loaded by the JVM, but read directly by my code. > >When I want to test it with Jython, jython doesn't load the jar >because it is "bad". As a result I don't get any of the classes that >are defined in the jar. Just to clear up possible confusion: Jython doesn't load anything from jars on CLASSPATH. Instead it uses the java mechanism for loading classes and resources from such jars. Jython only scans the jars to detect java packages (and support import *). If you don't need this scanning, you can manually tell jython which java packages you have: sys.add_package("my.javapackage.core") sys.add_package("my.javapackage.util") >Is there a way to turn off jython's processing and caching of the >jar's information so I can use this modified (err, hacked <wink>) jar? >If not, I can write some Java code to run through some tests. Have you checked if the JVM will load classes from such a corrupt jar? I wouldn't be too surprised if some JVMs will ignore a corrupt jar. I can't think of a way to achieve your goal without resorting to a file. regards, finn |
From: D-Man <ds...@ri...> - 2001-04-14 02:35:41
|
On Fri, Apr 13, 2001 at 10:06:57PM +0000, Finn Bock wrote: | [D-Man] | | Just to clear up possible confusion: Jython doesn't load anything from | jars on CLASSPATH. Instead it uses the java mechanism for loading | classes and resources from such jars. Jython only scans the jars to | detect java packages (and support import *). Ok. I was refering to the "sys-package-manager" messages that appear on startup. | If you don't need this scanning, you can manually tell jython which java | packages you have: | | sys.add_package("my.javapackage.core") | sys.add_package("my.javapackage.util") I assume this will work after the sys-package-manager says "ignoring corrupt jar file"? Before I was getting "No module 'my' found" (using your package name above). | >Is there a way to turn off jython's processing and caching of the | >jar's information so I can use this modified (err, hacked <wink>) jar? | >If not, I can write some Java code to run through some tests. | | Have you checked if the JVM will load classes from such a corrupt jar? I | wouldn't be too surprised if some JVMs will ignore a corrupt jar. I suppose some might. I've been using it with JDK 1.1.8 on a Windows box. I also tested it a while ago on a Solaris 8 system. I haven't heard any complaints yet about it totally hosing the system with other VMs. Officially we only support JDK 1.1.8 because a third-party library we use only officially supports JDK 1.1.8. We do know that the product works with JDK 1.2.2 because several customers have reported using it. | I can't think of a way to achieve your goal without resorting to a file. Ok, thanks for the help. -D |
From: <bc...@wo...> - 2001-04-14 07:34:53
|
[me] >If you don't need this scanning, you can manually tell jython which java >packages you have: > > sys.add_package("my.javapackage.core") > sys.add_package("my.javapackage.util") [D-Man] >I assume this will work after the sys-package-manager says "ignoring >corrupt jar file"? Before I was getting "No module 'my' found" (using >your package name above). Yes. You can also get rid of the "skipping bad jar" warning by setting the "python.verbose" property to "error" on the command line: jython -Dpython.verbose=error main.py or in the registry file. regards, finn |
From: Brian Z. <bri...@ya...> - 2001-04-16 04:04:39
|
With the error message: try path C:\Download\ exception in called method net.sourceforge.liftoff.installer.Install2.main java.lang.NullPointerException at java.util.Hashtable.put(Compiled Code) at net.sourceforge.liftoff.installer.Info.setProperty(Compiled Code) at net.sourceforge.liftoff.installer.Info.loadInstallerProps(Info.java:3 17) at net.sourceforge.liftoff.installer.Install2.<init>(Compiled Code) at net.sourceforge.liftoff.installer.Install2.main(Install2.java:130) at jython-21a1.main(Install.java:376) java.lang.reflect.InvocationTargetException I was testing using Sun JRE 1.1.8_005 and JRE 1.1.7B. I also verified that the installer works ok with MS JView 5.00.3802 (I believe equivalent to JRE 1.1.4) and Sun JRE 1.3.0_02. |
From: <bc...@wo...> - 2001-05-28 19:38:38
|
[Brian Zhou] >With the error message: > >try path C:\Download\ >exception in called method net.sourceforge.liftoff.installer.Install2.main >java.lang.NullPointerException > at java.util.Hashtable.put(Compiled Code) > at net.sourceforge.liftoff.installer.Info.setProperty(Compiled Code) > at >net.sourceforge.liftoff.installer.Info.loadInstallerProps(Info.java:3 >17) > at net.sourceforge.liftoff.installer.Install2.<init>(Compiled Code) > at >net.sourceforge.liftoff.installer.Install2.main(Install2.java:130) > at jython-21a1.main(Install.java:376) >java.lang.reflect.InvocationTargetException > >I was testing using Sun JRE 1.1.8_005 and JRE 1.1.7B. Thanks for reporting this. A fix will be included in the 2.1a2 installer. regards, finn |