Why are you using classes in the package com.sun.image.codec.jpeg
? You are not supposed to use those classes directly: Why Developers Should Not Write Programs That Call 'sun' Packages.
What does your program do? Does it just try to read or write a JPG image? That's very easy with the ImageIO
API. See this tutorial: Writing/Saving an Image.
Addition - The package com.sun.image.codec.jpeg
has been removed in Java 7 as mentioned in the Java SE 7 and JDK 7 Compatibility Guide.
Synopsis: The Non-standard
com.sun.image.codec.jpeg
Package is RetiredDescription: The
com.sun.image.codec.jpeg
package was added in JDK 1.2 (Dec 1998) as a non-standard way of controlling the loading and saving of JPEG format image files. This package was never part of the platform specification and it has been removed from the Java SE 7 release. The Java Image I/O API was added to the JDK 1.4 release as a standard API and eliminated the need for thecom.sun.image.codec.jpeg
package.
Description: The com.sun.image.codec.jpeg package was added in JDK 1.2 (Dec 1998) as a non-standard way of controlling the loading and saving ...
2020年1月6日 ... 问题项目中原图片压缩方式为: 使用maven进行打包时会报错(程序包com.sun.image.codec.jpeg不存在),如下: 原因按照Sun的官方解释:类似的接口...
2015年12月30日 ... 一些老的Java代码在JDK1.7下编译会报错,比如这个:程序包com.sun.image.codec.jpeg不存在。JPEGImageEncoder encoder = JPEGCodec.
Note that the classes in the com.sun.image.codec.jpeg package are not. * part of the core Java APIs. They are a part of Sun's JDK and JRE. * distributions.
Best Java code snippets using com.sun.image.codec.jpeg.JPEGImageEncoder (Showing top 20 results out of 315). Tip from Codota: Notice. Guided by Codota.
2017年6月9日 ... 原创博文,如需转载请通知作者并注明出处! 博主:疲惫的豆豆链接:http://www.cnblogs.com/dzblog/p/6971245.html 环境Maven:3.0.5 Java:1.
Oracle JDK Migration Guide ... Use the Java Image I/O API instead. The com.sun.image.codec.jpeg package was added in JDK 1.2 as a nonstandard way of ...