概述
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之间的区别所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复