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.

Thursday Sep 13, 2012

Java 7 Adoption at 79%

According to a recent blog post from the cloud hosting company Jelastic, Java 7 adoption on their platform is now at 79%. While this is a single data point and should not be read too broadly, it does match other indicators we have that Java 7 is picking up, such as uptake among Oracle middleware customers, download statistics and online activity. The spike in adoption in April coincided with the release of JDK 7 Update 4. This is in line with our expectations since that release added Mac OS X support as well as java.com moving to Java 7 as the default download for end-users; two events that marked the maturity of Java 7 to the community.

Since the original release of Java 7, Oracle has shipped 7 update releases, added ports to Mac OSX and Linux/ARM and expanded JavaFX to all common desktop platforms.

Thursday Apr 26, 2012

Oracle JDK and JavaFX SDK now GA on Mac OS X

Oracle JDK 7 and the JavaFX 2.1 SDK are now available for Mac OS X. This release is a major milestone in our effort to bring Oracle Java to Mac. From this point on, every release of Oracle JDK 7 and JavaFX 2.1 (and later) will be available on Mac at the same time as for Linux, Windows and Solaris.

Where do I download the JDK and JavaFX for OS X?
From java.oracle.com. The JDK download also contains the Java FX SDK.

Exactly what does this release contain?
A fully compatible implementation of Java SE 7, as well as most JDK development tools and the full JavaFX 2.1 SDK. Some of the serviceability and debugging tools and deployment technologies such as the Java Plugin and Web Start are not yet available, and will be added in subsequent releases. See the JDK release notes and the JavaFX release notes for details.

Does Oracle support NetBeans for use with JDK 7 on Mac?
Yes! NetBeans 7.1.2 was released simultaneously with JDK 7 Update 4, with full support for Oracle JDK on Mac. See the announcement here, and download it here.

Are there any known issues with this release?
Mac OS X is major new platform for us; the first new platform added in a very long time. It should be considered a "1.0" release and there are a number of known issues. Consult the release notes (JDK, JavaFX) for details.

What do I do if I believe I have found a new issue?
Consult the release notes first to ensure that it is not a known issue. You can ask for help to verify and troubleshoot on the appropriate mailing list or web forum, and then file a report in our bug system.

Is the source code to the OS X port available?
Yes! All code for the JDK can be found in the OpenJDK community in the JDK 7 Updates project. JavaFX is partially open sourced in the OpenJFX project; Oracle is working towards open sourcing the remaining parts.

What Apple hardware and what versions of OS X are supported?
Oracle's JDK and JavaFX release supports OS X Lion on any 64-bit capable Intel-based Mac. Specifically, our implementation is 64-bit only so it requires a 64-bit operating system.

Can I use the Oracle JDK on older OS X versions?
Probably not. The underlying issue here is that the Oracle JDK requires certain APIs that Apple introduced in Lion. The functionality introduced in these new APIs did to some extent exist in older OS X versions but were not official APIs.

What if I want a 32-bit JVM, or support for older PPC-based Macs?
There are community efforts based on OpenJDK to build JDK 7 for other configurations, easily found using your favorite search engine. We applaud these efforts! :-)

Can I get commercial support for the Oracle JDK and JavaFX on Mac OS X?
These are considered standard Oracle releases and are therefore covered under the Java SE Support program. Note that support on Mac is for development only; e.g. we don't expect your Mac to be running a business critical server-side application...

What can you say about the roadmap?
Future release of the Oracle JDK and JavaFX on Mac will follow the normal JDK release train with 4-6 releases every year. The next major milestone is JDK 7 Update 6 where we plan to add support for Plugin and Web Start. Early access builds are available here. JDK 8 will of course also support Mac OS X.

About

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.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today