Updating gzip library in jre

Is there a way to update the gzip library that the JRE is using?

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

An error in native code from the gzip library that the JRE uses.

+2


source to share


3 answers


Basically not (but you can probably do some operating system magic to override the built-in library loader to include a new one).



Did you find this problem in the Java error database? http://bugs.sun.com/

0


source


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

Read the warning: "Applications that use this parameter to override a class in rt.jar should not be deployed as this is against the Java 2 Runtime Environment binary license."



(Or if the error is in a native library, you can use java.library.path)

0


source


The short and simple answer is no. At least you don't want to go there for various reasons.

Unfortunately Commons Compress also only uses its own compressor from java.util.zip, but in your case I still use Commons Compress so that the compressor becomes easy to replace from an API point of view. Then write your own compressor. In java, if you don't need speed or use JNI, if you want to really get into it. Once the bug is fixed in the JRE, you can simply switch the implementation back to the JRE.

0


source