Sun announced in JavaOne 2006 that Java would become free and open source software, and on October 25, 2006, at the Oracle OpenWorld conference, Jonathan I. Schwartz said that the company was set to announce the release of the core Java Platform as free and open source software within 30 to 60 days.
Sun released the Java HotSpot virtual machine and compiler as free software under the GNU General Public License on November 13, 2006, with a promise that the rest of the JDK (which includes the JRE) would be placed under the GPL by March 2007 ("except for a few components that Sun does not have the right to publish in source form under the GPL"). According to Richard Stallman, this would mean an end to the "Java trap". Mark Shuttleworth called the initial press announcement, "A real milestone for the free software community".
Sun released the source code of the Class library under GPL on May 8, 2007, except some limited parts that were licensed by Sun from 3rd parties who did not want their code to be released under a free software and open-source license. Some of the encumbered parts turned out to be fairly key parts of the platform such as font rendering and 2D rasterisation, but these were released as open-source later by Sun (see OpenJDK Class library).
Sun's goal is to replace the parts that remain proprietary and closed-source with alternative implementations and make the class library completely free and open source. A third party project called IcedTea has created a completely free and highly usable JDK by replacing encumbered code with either stubs or code from GNU Classpath. IcedTea is currently available on Fedora 7 and Ubuntu.
In June 2008, it was announced that IcedTea6 (as the packaged version of OpenJDK on Fedora 9) has passed the Technology Compatibility Kit tests and can claim to be a fully compatible Java 6 implementation