`
sei_ljf
  • 浏览: 60894 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

Access restriction:The type BASE64Decoder is not accessible ...\jre\lib\rt.jar

阅读更多

今天项目引入一个老的基于jdk1.5的项目,由于之前用的是1.6报了如下的错误
Access restriction: The type BASE64Decoder is not accessible due to restriction on required library D:\java\jre1.5.0_08\lib\rt.jar
之前自己弄,搞得挺混乱,感觉机器上安两个jdk比较混乱,就把1.6也给卸掉了,原来依赖1.6的又得改成1.5 真够纠结的...

在网上找到了解决方法如下,我是用第二种方法解决的~~
Solution 1 :

import=”sun.misc.BASE64Decoder”
出现错误提示为:Access restriction: The type BASE64Decoder is not accessible due to restriction
on required library D:\ProgramFiles\MyEclipse\jre\lib\rt.jar
Solution 1 :
BASE64Decoder
这个没有java doc,属于jdk里不推荐使用的工具类
解决方案:
使用apache common中的Base64替换
你可以在这里下载Apache commons codec:
http://commons.apache.org/codec/
替换一下就可以了
强烈建议不要用sun.misc,是不安全的 ,最好不要使用

Solution 2:
1. Open project properties.
2. Select Java Build Path node.
3. Select Libraries tab.
4. Remove JRE System Library.
5. Add Library JRE System Library.
分享到:
评论

相关推荐

    sun.misc.base64decoder.jar下载

    sun.misc.BASE64Encoder找不到jar包的解决方法?... Access restriction : The constructor BASE64Decoder() is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar

    import com.sun.image.codec.jpeg.JPEGImageEncoder;包的下载

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar 此时解决办法: Eclipse默认把这些受访问限制的API设成了ERROR。只要...

    base64转换遇到问题解决方法

    使用了BASE64Decoder,但Eclipse提示:Access restriction : The type BASE64Decoder is not accessible due to restriction on required library C:\Program files\java\jre6\lib\rt.jar。 2. 字符编码问题:BASE64...

    解决eclipse导入rt包问题

    在使用Eclipse开发环境中导入这两个类时,可能会遇到访问限制错误:“Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar”...

    51CTO下载-DSSM335V4.part1

    Note: If the Demo does not start, be sure that the Demo Configuration Editor is not running and there are not any other demos running. If you copied the demo package directory, make sure the DSSM_335...

    Eclipse中引入com.sun.image.codec.jpeg包报错的完美解决办法

    但是,有时引入这两个包时会报出错误:`Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:/Java/jre1.6.0_07/lib/rt.jar`。 解决方法一:修改全局属性 ...

    eclispe错误

    在错误信息中,我们看到 "Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar",这表明你尝试访问的 `JPEGCodec` 类受到了...

    支持32和64位的Jpcap.dll

    说明部分dll文件中有多个目录分别表示多个系统专用文件 ...Please feel free to contact the legal owner of the file regarding the copyright and the restriction in use for more information.

    Eclipse中设置jar的访问受限设置

    例如,当尝试导入一个项目时,可能会出现以下错误提示:“Access restriction: The type And is not accessible due to restriction on required library C:\Program Files (x86)\Java\jdk1.5.0_09\jre\lib\rt.jar”...

    java识别验证码.docx

    Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt.jar ``` **解决方案:** 1. **调整Eclipse配置**:Eclipse默认将这些受...

    TeeChart Pro Activex Control v5

    <param name="Base64" value="..some content.."> =========================================== Key known unresolved issues: - ChartEditorPanel not supported in MS VC++ applications due to incorrect ...

    Json.net for .net3.5

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, ...

    nrComm

    nrComm Lib v6.30 Copyright (C) 1997-2003 Roman NovgorodovnrComm Lib provide some tools for performing serial communicationstasks for Delphi/Kylix/CBuilder development. This is good professionalSerial ...

    TeeChart2018ActiveX_0_2_9Eval3264

    Chart isn't yet loaded when the event is called. An option to workaround it may be to set a boolean 'OK_To_Run' variable to set after the first Chart Repaint. eg. OK_To_Run false on load and ...

    PHP错误WARNING: SESSION_START() [FUNCTION.SESSION-START]解决方法

    做开发的时候,操作session有时候会遇到这个问题:Warning: session_start() [function.session-start]…… ...Warning: session_start()[function.session-start]: …… failed: No such file or directory……等情况...

    a-pdf Restriction.Remover.v1.6.9.010

    "a-pdf Restriction Remover v1.6.9.010" 是一款专门针对这些限制的高级PDF处理工具,旨在帮助用户轻松解除PDF文件中的应用限制。 该软件的核心功能在于它的解除限制能力,能够移除PDF文档中的打印、复制粘贴、编辑...

    SQL Server Data Access Components 2.45.22 for d6

    [SQL Server] <-> [OLE DB] <-> [Client application]Using SQL Server Data Access gives you the following advantages: - No distribution, installation and configuration is required for BDE and ODBC;...

    Sortable前端框架

    unwanted touchmove events even when your finger is not moving, resulting in the sort not triggering. This option sets the minimum pointer movement that must occur before the delayed sorting is ...

Global site tag (gtag.js) - Google Analytics