开发者

Updating gzip library in jre

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 la开发者_JAVA百科test JRE work by updating just gzip.

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


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/


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)


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜