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 Retired

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 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 the com.sun.image.codec.jpeg package.

java - import com.sun.image.codec.jpeg.* - Stack Overflow

https://stackoverflow.com/questions/1906673/import-com-sun-image-codec-jpeg

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 ...

JAVA图片压缩-程序包com.sun.image.codec.jpeg不存在- 简书

https://www.jianshu.com/p/ce7b1d699eb4

2020年1月6日 ... 问题项目中原图片压缩方式为: 使用maven进行打包时会报错(程序包com.sun.image.codec.jpeg不存在),如下: 原因按照Sun的官方解释:类似的接口...

程序包com.sun.image.codec.jpeg不存在解决方法_killer-leon的博客 ...

https://blog.csdn.net/u011627980/article/details/50436842

2015年12月30日 ... 一些老的Java代码在JDK1.7下编译会报错,比如这个:程序包com.sun.image.codec.jpeg不存在。JPEGImageEncoder encoder = JPEGCodec.

jdk8/JPEGCodec.java at master · ZenOfAutumn/jdk8 · GitHub

https://github.com/ZenOfAutumn/jdk8/blob/master/com/sun/image/codec/jpeg/JPEGCodec.java

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.

com.sun.image.codec.jpeg.JPEGImageEncoder java code ...

https://www.tabnine.com/code/java/classes/com.sun.image.codec.jpeg.JPEGImageEncoder

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.

[Maven]package com.sun.image.codec.jpeg does not exist - 疲惫的 ...

https://www.cnblogs.com/dzblog/p/6971245.html

2017年6月9日 ... 原创博文,如需转载请通知作者并注明出处! 博主:疲惫的豆豆链接:http://www.cnblogs.com/dzblog/p/6971245.html 环境Maven:3.0.5 Java:1.

Removed APIs - Java

https://docs.oracle.com/en/java/javase/17/migrate/removed-apis.html

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 ...