Java’s Future

Posted May 16th, 2006 in Development, Java

There’s been a lot of talk about Java lately, mostly because JavaOne is currently underway in San Francisco, but it’s got me thinking about Java’s future, should it have one.

When Java was released in the early 90’s, it got itself a bad name, applets where overused, slow, and usually useless. The niche that was once filled by these applets has long been taken over by Flash now.

Java has made huge inroads on the server-side. Java Server Pages and similar frameworks have made it one of the top web application platforms today. So, the language touted as ‘write once, run anywhere’ has been more successful on servers where the environment can be controlled, as opposed to what it was originally designed for.

This leads to the question ‘why hasn’t Java been successful on the desktop?’ One reason is that Java applications were slow and ugly. Fair enough, but the key here is ‘were’; Swing looks a lot better than it used to (and much better than AWT ever did). Improvements in the JVM (both Sun’s and IBM’s) have given Java applications the ability to approach the speed of applications written in native languages. Does this mean that all Java applications are now fast? Of course not; Java lowers the barrier to entry for somebody to create a GUI application; unfortunately this means that a number of applications are poorly written. Java builds in a lot of safeguards that make it easier to make an application work, but that doesn’t help you make it good. In a language like C++, the barrier is much higher but that forces people to think and learn more about what they’re doing. Now, don’t get me wrong, lowering the barrier like this is a good thing overall–it may very well be the thing that saves the music industry by helping to cut out the record companies, but that’s a topic for another post on another day.

Another issue that always comes up is that Java applications don’t feel like native ones. This is something else that’s gotten a lot better in the last couple of years. A few lines of code in a Java application will tell it to use Windows-style widgets on Windows systems and OS X ones on a Mac. That brings you very close to the feel of a Windows application (things like drag & drop take a bit more work), and it brings you 80% of the way on the Macintosh. There are a few more things you have to do to make Java feel ‘right’ on the Mac, like making the menu go to the top of the screen, using the default menus, etc. but it can be done. I’ve written an application that, with a single JAR file, feels like a Mac app on a Macintosh, feels like a Windows app on Windows, and also runs well on Linux. Is it ‘write once, run anywhere’? Not quite, the GUI elements needed to be tweaked on the different platforms, but everything else works fine.

So, now that the speed and the feel can be taken care of, we deal with the other major issue, which is probably the biggest issue–deployment. This has always been a big issue for Java… you have to get the JVM on the system before the applications can run. There are a few issues here, the first of which is that the JVM is large–you can’t expect everybody to download it. Getting distribution rights from Sun used to also be tricky or impossible, so you couldn’t just include it on the CD with your application and OEMs couldn’t include it on all PCs. That has changed in the last couple of days; Sun is now going to allow OEMs to apply for a license to redistribute, they’re also going to allow Linux distributions to include it. They’ve also stated that they will open source Java when they decide on a way to do it that won’t risk fragmenting the language.

So, do I think Java has a future? I do. I believe that it’ll remain a strong force on the server, but I also think that it may be nearing it’s time to shine on the desktop as well.

Leave a Reply