Error:
Access restriction: The type ‘JPEGCodec’ is not API (restriction on required library …
Another error on the Internet (not yet encountered)
To process images in MyEclipse, two packages need to be introduced.
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
Error:
Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library C:\Java\jre1.6.0_07\lib\rt. jar
Solution at this point.
Eclipse has set these restricted APIs to ERROR by default, just change the Forbidden references(access rules) in the Deprecated and restricted APIs in Windows-Preferences-Java-Complicer- Errors/Warnings. If you select the Forbidden references (access rules) in the Deprecated and restricted API in Windows-Preferences-Java-Complicer/Warnings as Warning, you can compile it.
Similar Posts:
- [Solved] Eclipse Error: Access restriction: The type ‘BASE64Decoder’ is not API
- The solution of base64decoder prompt error under eclipse
- Steps of MyEclipse / eclipse importing sun.misc.base64encoder jar package
- How to Solve Eclipse Access restriction (javax.xml.namesp)
- JAVA8 Access restriction: The type ‘Application’ is not API (restriction on required lib
- QT use of undeclared identifier ‘cout’
- Solutions to the channel problem of PIL PNG format
- [Solved] java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/ImageFormatException (Upload Images Error)
- Sun.misc.base64decoder import exception and handling ideas
- MySQL import file prompt — secure file priv option problem