Tuesday Feb 19, 2013

Migrating from Java SE 6 to Java SE 7

Why should I migrate from SE 6 to SE 7?

The most obvious reason is that you will get access to all the new features and improvements that we have made to Java with the introduction of Java 7.

A few of these changes might require some updates to your code, but they are changes that are well worth it from a performance, quality and readability perspective. You can find more information here: http://docs.oracle.com/javase/7/docs/webnotes/adoptionGuide/index.html

Another important reason is the End of Public updates milestone for Oracle JDK 6. After February 2013, future JDK 6 updates will no longer be publicly available and old JDK 6 releases will me moved to the Java Archive. Running on an old version of Java is a bad idea, so now is the time to move to 7. For more information on the End of Public Updates milestone, see Java SE End of Life Policy

If you are unable to migrate some of your applications and need continued access to Oracle JDK 6 updates, Oracle offers long-term support through the Java SE Support program.

What do I need to do?

Option 1 – “Just run”

Java has binary backward compatibility. This means that if you have a program that has been compiled for and is running with Java SE 6, it will also run on a Java SE 7 JVM. Java SE 7 is strongly compatible with previous versions of the Java platform. Almost all existing programs should run on Java SE 7 without modification. However, there are some minor potential incompatibilities in the JRE and JDK that involve rare circumstances and "corner cases" that are documented here for completeness: http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#incompatibilities.

Option 2 – Re-compiling and modifying source code.

Most of the new features introduced with Java SE 7 are improvements on a Java code level. To benefit from these you will have to update your old source code, or use the new features in any new code you write, and recompile your code for Java SE 7.

The Netbeans IDE can help you find locations in the code where you can use some of the new features, see this link for details. Other major IDEs have similar features.

Some APIs have been marked as deprecated, which means we encourage you to use the replacement APIs instead. The deprecated APIs can be found here.

Also, some of the APIs in the sun.* packages have changed. These APIs are, and have always been, intended for internal use only and any use is “at your own risk”. It is strongly recommended to find alternatives to using these packages as soon as possible.

Wednesday Aug 08, 2012

Java 6 End of Public Updates extended to February 2013

Earlier this year I announced that the EOL for Oracle JDK 6 had been extended from July 2012 to November 2012. JDK 6 was the default JDK for over 5 years, and so it seems fair that it have a longer publicly available support time-frame than past major releases.

After further consultation and consideration, the Oracle JDK 6 End of Public Updates will be extended through February, 2013. This means that the last publicly available release of Oracle JDK 6 is to be released in February, 2013. After the End of Public Updates for JDK 6, if you have a valid support contract for an Oracle product that requires JDK 6, or an Oracle Java SE Support contract, there will still be additional support versions of JDK 6 available from My Oracle Support. Previously available versions of JDK 6 will remain available to the public through the Java Archive for debugging and testing purposes but Oracle no longer recommends using those in production.

It's important to highlight that, as we establish a steady two year cadence for major releases, End of Public Update events for major versions will become more frequent. As a reminder, moving forward, Oracle will stop providing public updates of a major JDK version once all of the following criteria have been met:

  • Three years after the GA of a major release
  • One year after the GA of a subsequent major release
  • Six months after a subsequent major release has been established as the default JRE for end-user desktops on java.com

For more information see the FAQ on OTN.


Henrik Stahl is VP of Product Management in the Java Platform Group at Oracle, and is responsible for product strategy for Java ME and SE.


« April 2014