views:

90

answers:

3

Is there a way to update gzip library that JRE uses?

There is a bug in gzip library that is used by latest JRE, and it has been fixed in later version of gzip library, so I would like to make latest JRE work by updating just gzip.

Bug is in a native code from gzip library that JRE uses.

A: 

Basically no (but you can probably do operating system magic to override the native library loader to include the new one).

Have you located this issue in the Java Bug Database? http://bugs.sun.com/

Thorbjørn Ravn Andersen
I sent them bugrequest yesterday, but they haven't filed publicly any bugs I sent so far (months ago). I was thinking of maybe swapping some files(libraries) in the JRE itself.
Sarmun
In that case your best bet is building the JRE yourself (but that requires that the appropriate license does apply to you). For the Sun source, the requirements are strict. For the OpenJDK you must adhere to the CDDL+GPL license.
Thorbjørn Ravn Andersen
A: 

I think it's possible by setting the bootclasspath: http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html to override the class with the newer version.

Please read the warning: "Applications that use this option for the purpose of overriding a class in rt.jar should not be deployed as doing so would contravene the Java 2 Runtime Environment binary code license."

(Or if the bug is located in a native library, you could use java.library.path)

Chris Lercher
A: 

The short and simple answer is "no". At least you would not want to go there for all sorts of reasons.

Unfortunately Commons Compress also only uses the native compressor from java.util.zip but in your case I would still use Commons Compress so the compressor becomes easy to replace from the API point of view. Then write your own Compressor. In java if you don't need the speed or using JNI if want to really go for it. As soon as the bug is fixed in the JRE you can just switch the implementation back to the JRE one.

tcurdt