是否有Java 8支持的SqlJ版本? [英] Is there any Java 8 supported release of SqlJ?

查看:85
本文介绍了是否有Java 8支持的SqlJ版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我遇到了错误:

Exception in thread "main" java.lang.NoClassDefFoundError:sun/io/CharToByteConverter

这是因为在Java 8中,不推荐使用CharToByteConverter类,因此已将其删除.

This is because in Java 8, the CharToByteConverter class has been removed as it was deprecated.

现在,我想知道可以替代此包/类并提供其功能而不会引发上述异常的任何替代方法.

Now I want to know of any alternative which would replace this package/class and provide its functionality without throwing the exception mentioned above.

此类用于SQLJ的

Translator.jar 

它里面是

sqlj.util.io.OracleOutputStream.class

如果将CharToByteConverter类替换为java.nio.charset类,SQLJ仍然可能无法检测到它.如果我错了,请纠正我.并且让我知道用java.nio.charset替换CharToByteConverter是否可以解决问题?

If I replace the CharToByteConverter class with the java.nio.charset class, still the SQLJ might not be able to detect it. Please correct me if I am wrong. And let me know if replacing the CharToByteConverter with java.nio.charset might fix the issue?

推荐答案

这是一个老问题,但直到今天对我来说也是一个问题.因此,也许其他人可能会从该信息中受益,Oracle对此有一个错误#21315718,其中包含解决方案:"Translator.jar和runtime12.jar与JDK 8不兼容.未发布的Bug 21315718中报告了该问题-sqlj转换器不适用于jdk8."升级这两个jar之后,SQLJ并没有对我提出上述错误.

This is an old issue, but WAS an issue for me until today as well. So maybe others may benefit from the information, that Oracle has a bug #21315718 for that, containing the solution: "Translator.jar and runtime12.jar were not compatible with JDK 8. The issue is reported in unpublished Bug 21315718 - sqlj translator does not work with jdk 8." After upgrading these two jars, SQLJ did not raise the above error for me.

这篇关于是否有Java 8支持的SqlJ版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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