07 September 2005

Java isn't just for applets

How Java could change just about everything

This article is a little late because of the Labor Day holiday weekend. Also, this is not a technical article as such; instead this will be, in part, an answer to a question that was posted in a comment on my Augmented Reality blog. The question, from QiSoftware, was:

You write a lot of Java programs for non-internet use? Is there an audience for Java at this level?


The short answer that I gave was basically that Java is no longer just for Internet applications and web-page applets. The full answer is a little more involved. What follows is my opinion of the current Java landscape.

Most of the Java applications I develop these days are for Internet or intranet use - but in our networked world, the same is probably true of applications that C and C++ developers are creating. Java is also just as useful for creating stand-alone applications, including those with GUIs. The main advantage of Java over C/C++ for almost any application can be summed up in a single word: Portability. I can develop and test an application on a Windows system and be almost certain that I can move the compiled binary to any other platform and it will work.

Of course, it's not all wine and roses; Java has its drawbacks too. For one thing, because Java compiles to interpreted bytecodes it's not as efficient as a purely compiled language. Things are getting better all the time on that front, because the JVMs can translate bytecodes to native machine code and the result is that a Java application running on a modern JVM isn't much slower than a native-compiled equivalent. For anything but the most high-performance applications, Java is fast enough.

Other drawbacks aren't so much technical as, for want of better terms, legal and political. For example, because of Sun's licensing restrictions you can't guarantee that any target platform will have a Java runtime installed, which means that you can't just give a Java application to a non-technical user and have them install and use it as easily as a native application - they may have to go to Sun's Java website and download and install a JRE (making sure to sign the license agreements) before they can run any Java applications.

One day, I hope, we will see JVMs being packaged as part of all major operating systems so that it's there and usable right out of the box. You'll be able to install Java applications as easily as native Windows or Linux applications, and the OS will recognize executable JAR files as such and know when you click on an application icon that it needs to fire up the JVM to run it.

Labels:

1 Comments:

  • I figured out that I could run a Java-Calendar Application with code generated on Windows NT and GUI still relying on AWT across and on different OS such as Windows, Unix different flavours such as AIX, Suse, SUN and HP and even on IBM OS390/OE!
    Java works really well. Try this with C++ - the source code might already contain incompatible parts.
    They only other language which did that well was Microfocus Cobol, which I generated on an OS2 PC and was able to run it on Windows, Unix or MVS without recompile!

    By Blogger world-peace-society, At 12:32 AM  

Post a Comment

Subscribe to Post Comments [Atom]



<< Home