Sunday Feb 24, 2013

Java in Steam Store

If you are even remotely into PC gaming, you must be familiar with Steam. And if you are familiar with Steam, you are most likely aware that they recently announced the GA version of Steam for Linux. I for one hope that this might finally signal an advent in Linux as an accepted and broadly used platform for PC gaming. One nice side-effect is that Java might get more adoption in this space, such as for casual games (Angry Birds is a good example) and for any game which doesn't require absolute 100% control over the hardware to be performant (Minecraft falls in this group). The benefit of Java is clear; porting cost between different platforms goes down. It may not be write-once-run-anywhere depending on how you use native libraries but certainly easier than porting a native game.

With this in mind, I was very happy to see this blog about Java on Steam from Puppy Games. They have built a wrapper library around the Steam APIs and use LWJGL as a graphics library. Other options would of course be JOGL or - as it matures - JavaFX, which will very soon be fully open sourced through the OpenJFX project. A great simple example of a JavaFX game is this version of Pong which is written in less than 100 lines of code.

Kudos to Puppy Games for their initiative, and to Steam for going Linux!

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:

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:

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.

Oracle JDK 7u15 and 6u41 released

Oracle has released a Critical Patch Update which including updates to JDK 6 and 7. More information about this CPU is available on and in the releases notes (7u15, 6u41).

The JDK releases are available from the following download sites:

Note that this JDK 6 release is the final public update of JDK 6. For more information on the End of Public Updates milestone, see my previous blog on the topic.


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.


« February 2013 »