报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library
On 报错 to The not is type access
2023-09-14 09:03:40 时间
报错:
Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar
解决方法:
Project -> Properties -> libraries,
先remove掉JRE System Library,然后再Add Library重新加入。
============================================
在Eclipse中处理图片,需要引入两个包:
import com.sun.image.codec.jpeg.JPEGCodec;
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。只要把Windows-Preferences-Java-Complicer- Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过。
优先选择第一种方法
相关文章
- snapshots On Vmware
- 用Navicat连接mysql报错:2003-Can't connect to MySql server on '10.100.0.109'(10039)
- [ARIA] Create an Accessible Tooltip on a Text Input
- win10安装jenkins报错0x8007052e -Error logging on
- 解决docker network create --subnet报错的问题:Error response from daemon: Pool overlaps with other one on th
- cordova报错:Could not find an installed version of Gradle either in Android Studio, or on your system
- AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.
- vue项目报错:warning Disallow self-closing on HTML void elements (<img/>)
- Android问题笔记 - Can‘t toast on a thread that has not called Looper.prepare()
- mac 报错Root chmod operation not permitted on file
- Caused by: java.net.ConnectException: Call From master/192.168.199.130 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: http://wiki.
- 谣言检测(SRD-PSCD)《Rumor Detection with Self-supervised Learning on Texts and Social Graph》
- PAT 1127 ZigZagging on a Tree[难]
- Mybatis使用PageHelper分页插件报错Could not find method on interface ibatis.executor.Executor named query.
- Mha报错Checking slave status failed on