Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

Java: It's a good thing

Why Java isn't slow, ugly, or irrelevant

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Simson Garfinkel gives Java advocates plenty of things to talk about in his intriguing article "Java: Slow, Ugly, and Irrelevant" (Salon, January 2001). As a fan of Java, I felt compelled to formulate a more realistic perspective -- albeit, in a forum for other Java fans. However, taking a step back from the technology we use on a daily basis proved to be an interesting experiment.

Is Java slow, ugly, and irrelevant?

In his article, Garfinkel leaves no room for doubt: he "hates" Java and feels the industry would be better off without it. Although I agree with numerous points he makes, I also feel he takes a somewhat simplistic and superficial look at Java. Let's examine his arguments more closely.

Garfinkel highlights what he calls two "Big Lies" in Java: its speed and its "Write Once, Run Anywhere" promise of platform-independent computing. Both speed and portability are indeed important to Java, but I wouldn't make conclusions about Java as a whole based on those two issues alone. That would be as naive as dismissing C++ merely because you can easily make memory-management bugs with it or because it's a nightmare to use with shared libraries.

Is Java slow?

Let's be fair. Java is not exactly the racecar of programming languages. Sure there are plenty of examples showing Java to be either incredibly fast or incredibly slow, but the reality is that most Java programs are heavyweights compared to their C- and C++-based equivalents. This translates to slower execution speed and more intensive memory usage.

The Java Virtual Machine (JVM) generates a significant portion of that overhead. Typically, Java programs are not directly executed by the computer's hardware; instead, a special program, the virtual machine, runs the Java program. The benefits of having the JVM are Java's flexible and powerful security architecture, the plug-in nature of Java components like servlets and applets, and the portability of compiled Java programs (.class files). In addition, most modern virtual machines also contain a just-in-time compiler that compiles Java byte-codes into native machine instructions to improve performance. But all of this comes at a price: the JVM consumes both processor time and memory while managing a Java program's execution.

With standalone, GUI-based desktop applications, Java's lack of speed is most obvious. I tend to agree with Garfinkel's point; at this moment, Java is not ideal for developing desktop applications. These applications have several requirements that are not Java's strong suits:

  • Easy installation
  • Fast and responsive user interfaces
  • Ability to run on three-year-old computers
  • Clean integration with Windows


From my own experience with Java, I've learned that easy installation is extremely important for the average Windows user. The extra step that Java needs for a virtual machine to execute a program complicates installation and adds a significant extra download. Also, most programmers don't want to deal with the different Java versions and virtual machines. Most of the feedback I get from users involves installation problems. True, native executables have similar issues to deal with, but with Java they tend to be worse.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources