我是靠谱客的博主 瘦瘦宝贝,最近开发中收集的这篇文章主要介绍sun java和openjdk区别,Sun JDK和open JDK之间的区别,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

I am running into errors such as the following:

Exception in thread "Thread-1" java.lang.IncompatibleClassChangeError:

Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface

was expected

I have built my JAR's using Sun JDK and I am running on OpenJDK. I am kind of stuck with this environment.

Is there an easy way around this? Do I have to compile and run the code on OpenJDK?

解决方案

By the looks of it, Jasper Reports is drilling down and using internal classes / methods that it shouldn't use. This apparently doesn't work on all platforms ... which is not surprising because Sun / Oracle specifically state that doing this is liable to break.

What should you do?

Check the Supported Platforms datasheet. I note that it lists OpenJDK 6, but not OpenJDK 7. Maybe you should stick with the JasperSoft supported platforms.

I found this page which seems to talk about this problem ... or something rather similar ... and offers a workaround.

最后

以上就是瘦瘦宝贝为你收集整理的sun java和openjdk区别,Sun JDK和open JDK之间的区别的全部内容,希望文章能够帮你解决sun java和openjdk区别,Sun JDK和open JDK之间的区别所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(40)

评论列表共有 0 条评论

立即
投稿
返回
顶部