在 Java 9 中删除了哪些 类?在 Java 9 上获取 NoClassDefFoundError。Java 8 工作

Which classes are removed in Java 9? Get NoClassDefFoundError on Java 9. Java 8 work

在 Java 9 中删除了哪些 类?

在 Java 8 我的工具正在工作。

在 Java 9 我得到:

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/JPEGCodec

似乎删除了一些类。

我在 Windows 上使用 Oracle JDK。

The JDK 9 release note and The one for removed features.

他们说

client-libs/2d Remove the com.sun.image.codec.jpeg package com.sun.image.codec.jpeg has been shipped as a non-standard API since JDK 1.2. It was always advertised as a stop-gap measure until a proper standard equivalent was provided. That replacement (javax.imageio) has been there since JDK 1.4. As a result JDK 9 finally removes the long deprecated com.sun.image.codec.jpeg API which has been flagged as intended for removal for several releases. Applications which still depend on it will need to be re-coded in order to run on JDK9. See JDK-8038838