Why does older java code fail to compile in newer versions of JBuilder?

By: Christopher Moeller

Abstract: Documentation of JFC specification changes relating to relocation of class files


When I attempt to compile older java code in the new release of JBuilder, it produces a "class not found" error. Why is this message appearing?


This may be because of redefinitions that occurred with the release of JDK 1.1.8 that relocated the package in which the Swing classes are found.

Historically, the earlier JDK 1.1.X used the JFC 1.0 specification (JFC includes AWT, Swing, etc.). The naming convention then was defined as the following:


Now, since JDK 1.1.8, this naming convention changed with the release of JFC 1.1 specification. The naming convention was then changed to the following:


Thus, you will need to change any import statements that reference the old naming convention to reflect the updated specification.

Please note that some versions of JBuilder feature the Package Migration Wizard. This feature will allow to make these changes automatically. Check the documentation for your version of JBuilder to see if you have this feature.


Server Response from: ETNASC01