sun.misc.BASE64Decoder在java应用程序中显示错误 [英] sun.misc.BASE64Decoder showing error in java application

查看:173
本文介绍了sun.misc.BASE64Decoder在java应用程序中显示错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些java文件中有一个用法:

In some java file there is a use of :

import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;

当我把那个java文件放在Eclipse IDE中时。它不会检测这些文件。
但是这些包(sun.misc.BASE64Decoder,sun.misc.BASE64Encoder)都在rt.jar文件中。在我的项目库中,rt.jar可用。
但为什么它显示错误(eclipse中的红线)?

and when I put that java file in Eclipse IDE. It will not detecting these files. But these packages(sun.misc.BASE64Decoder , sun.misc.BASE64Encoder) are inside the rt.jar file. In the library of my project "rt.jar" is available. But why it shows error(red lines in eclipse) ?

推荐答案

不要在阳光下使用类。 misc包。这些都被弃用并且很糟糕。查看 Apache commons编解码器,了解base64编码和解码。 为什么不使用sun.misc。*类

Don't use classes in the sun.misc package. These are deprecated and terrible. Check out Apache commons codec for base64 encoding and decoding. Why not to use sun.misc.* classes

这篇关于sun.misc.BASE64Decoder在java应用程序中显示错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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