zoukankan      html  css  js  c++  java
  • import com.sun.image.codec.jpeg.JPEGCodec不通过 找不到包

    在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 ...jre1.6.0_07lib t.jar

    解决办法:

    Eclipse默认把这些受访问限制的API设成了ERROR。只要把Windows-Preferences-Java-Complicer-Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过。

  • 相关阅读:
    《研磨设计模式》阅读摘要
    心电图
    nodejs
    自动化测试
    Hook技术
    热修复原理
    理解ClassLoader
    Dalvik和ART
    Java虚拟机
    理解WindowManagerService
  • 原文地址:https://www.cnblogs.com/Joanna-Yan/p/4773271.html
Copyright © 2011-2022 走看看