ClassNotFoundException or NoClassDefFoundError occured after migrating between different versions of JDK or different implementations of JDK (Oracle JDK and OpenJDK, etc)

Solution Unverified - Updated -

Issue

  • ClassNotFoundException or NoClassDefFoundError occurred after migrating between different versions of JDK or different implementations of JDK (Oracle JDK and OpenJDK, etc).
  • ClassNotFoundException or NoClassDefFoundError is thrown due to lack of classes in the packages like sun.* and com.sun.*, which are not standard API.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.