ClassNotFoundException or NoClassDefFoundError occured after migrating between different versions of JDK or different implementations of JDK (Oracle JDK and OpenJDK, etc)
Issue
ClassNotFoundExceptionorNoClassDefFoundErroroccurred after migrating between different versions of JDK or different implementations of JDK (Oracle JDK and OpenJDK, etc).ClassNotFoundExceptionorNoClassDefFoundErroris thrown due to lack of classes in the packages likesun.*andcom.sun.*, which are not standard API.
Environment
- Red Hat build of OpenJDK
- Oracle JDK
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.