Sun JDK和open JDK之间的区别 [英] difference between Sun JDK and open JDK

查看:709
本文介绍了Sun JDK和open JDK之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到如下错误:


线程Thread-1中的异常java.lang.IncompatibleClassChangeError:
找到类com.sun.image.codec.jpeg.JPEGImageEncoder,但接口
是预期的

Exception in thread "Thread-1" java.lang.IncompatibleClassChangeError: Found class com.sun.image.codec.jpeg.JPEGImageEncoder, but interface was expected

我有使用 Sun JDK 构建了我的JAR,我在 OpenJDK 上运行。我有点沉溺于这种环境。

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

有一个简单的方法吗?我是否必须编译运行 OpenJDK 上的代码?

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

推荐答案

从它的外观来看,Jasper Reports正在向下钻取并使用它不应该使用的内部类/方法。这显然不适用于所有平台......这并不奇怪,因为Sun / Oracle特别声明这样做可能会破坏。

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.

你应该怎么做?


  • 检查支持的平台数据表。我注意到它列出了OpenJDK 6,但没有列出OpenJDK 7.也许你应该坚持使用JasperSoft支持的平台。

  • 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 JDK和open JDK之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆