如下引入JRE中的类
import sun.misc.BASE64Decoder;import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler;
Eclipse报错。 Eclipse中设置:
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and trstricted API -> Forbidden reference (access rules): ->由Error改为 warning 即可。