1

A client on windows xp pro x32 just updated java to java8 u45 b14 (from java7) and started getting NoClassDefFoundError on sun.awt.VerticalBagLayout

Reverting back to Java7 resolved the issue.

Has oracle discontinued support for sun.awt classes?

pstanton
  • 35,033
  • 24
  • 126
  • 168
  • The sun.awt classes are not supposed to be used. They are described as implementation details. Please see http://stackoverflow.com/questions/4941337/com-sun-awt-package-usage – Evan Williams May 01 '15 at 03:09
  • 1
    See [Note about sun.* packages](http://java.sun.com/products/jdk/faq/faq-sun-packages.html). – user207421 May 01 '15 at 03:12
  • @EJP thanks. I guess I will have to find a replacement for that class then... – pstanton May 01 '15 at 04:41
  • This question is not at all an exact duplicate. What Java supports and what constitutes bad practice are two very different things. I just compiled with Java 8 using sun.awt and I did not have any problems using sun.awt.AWTAccessor and a number of other classes. It's possible they have changed the implementation in 8 and removed VerticalBagLayout. If you understand the risks and limitations and test properly there's no reason not to use classes. – Mishax Apr 12 '17 at 11:03

0 Answers0