Java: What does its future hold?

Oracle's imminent acquisition of Sun could strengthen Java -- or cripple it

Page 2 of 4

The ease of these new languages hides some fundamental limitations: Java lovers point out that Ruby developers often reach for JRuby, a Java-based implementation of the language, because Java's virtual machine does a better job of handling heavy loads and unleashing multiple threads. Jython, a Java-based clone of Python, has similar fans.

Java coders are also limiting the incursions of these new languages by borrowing many of the best techniques and folding them back into Java. Many of the simple declarative patterns from Ruby on Rails were explicitly imitated by Grails, a framework that glues together scripting extensions such as Groovy with database middleware called Hibernate. Groovy itself adds many more dynamic options for code interpretation while linking directly to any part of the Java API. There's no need to even consider Python or Ruby because Groovy lets Java programmers enjoy the seemingly endless variety of a huge library and the rock-solid VM at the foundation with a sleek, modern syntax.

[ Follow the Oracle/Sun merger drama and other hot Java topics in JavaWorld's Josh Fruhlinger's blog and in JavaWorld's Daily Brew. ]

Going mobile
The number of Java phones -- 2.6 billion -- is staggering because many of the simplest phones on the market run Java ME somewhere inside. This lets companies such as Wattpad.com build document reading platforms that run throughout the third world.

The numbers of smartphones running Java, though, is a bit less staggering. The iPhone's tremendous success is encouraging many to relearn Objective C, a language that gives the programmer much more low-level control over system issues like memory consumption. Java hides most of that from the programmer, a blessing until there's a need to micromanage those resources as there might be in some games that fail badly if there's a single hiccup to collect garbage. Smartphones, alas, need more careful management of resources than almost any other platform because battery life is such a crucial commodity.

Java programmers will be in demand, though, because the BlackBerry continues to embrace Java ME on its new platform by adding support for the touch screen and the accelerometer to the profile. Android is a bit of a wild card. Google is licensing the software core freely, and many of the phone manufacturers are jumping on the bandwagon. WiseAndroid.com lists more than 50 possible models coming soon. Verizon's marketing campaign will draw many to the platform.

There are fault lines that may not affect most developers but could offer some foreboding of a future schism. Google built Android on top of the open source Apache Harmony and its classes, not the Sun-developed JDK and Java ME. It all looks pretty much the same to anyone writing code in Eclipse -- and it doesn't matter in many cases because Android development requires filling out plenty of XML forms -- but the fragmentation could become a problem if the two stacks drift too far from each other.

Gaining desktop ground
Most people continue to assume that Java never succeeded on the desktop, a statement that may be correct only in perception. Slowly but surely, Java has insinuated itself into the cracks and crevices of the modern OS. Although standard applications built with Swing continue to suffer by trying to target the lowest common denominator of each platform, newer options such as JavaFX and Webstart make it possible to distribute software effectively through the Web. The local platform handles all of the caching of JARs. All it takes is a click on a link and some occasional follow-up clicks on a dialog box granting privileges and the software is installed, updated, and ready to run.

JavaFX continues to be a real wild card. The graphics are now competitive with Adobe's Flash and the computational engine supports much of the full Java API, but the language is a strange bastardization of real Java, JavaScript, and some other schemes for different punctuation. The code isn't as wordy as regular Java, so it's something new for a Java programmer to learn. Still, the new animation classes may make it worthwhile for highly interactive desktop tools.

| 1 2 3 4 Page 2
From CIO: 8 Free Online Courses to Grow Your Tech Skills
Notice to our Readers
We're now using social media to take your comments and feedback. Learn more about this here.