Java is a coupled programming language and execution platform developed at Sun Microsystems. Those primarily responsible for it, and the names most closely linked to it, are Bill Joy and James Gosling. Originally called Oak, it was positioned initially as an embedded platform for consumer appliances.

It languished in this niche until about 1995, when Sun introduced its slow and clumsy HotJava web browser and allowed Netscape to implement a Java execution engine into its browser as well. These efforts were the thrust of Sun's attempt to reposition Java as a desktop application language, and specifically one that could be used to distribute applications over the Web by embedding Java programs in web pages: to use Sun's term, applets. Part of the allure of this strategy was the theory that Java programs could run identically on any operating system, allowing universal access and doing for programs what HTML did for documents. It isn't surprising that Java was briefly a media darling, as it seemed to make the already hot Web interactive and exciting. Plus it has a cute name. The media love a cute name for technology they don't understand.

While Java was a hot industry buzzword, there was a brief flurry of major applications being ported to Java, most notably Corel and WordPerfect. However, these efforts failed as their proponents discovered Java's terrible performance, flakey and distinctly unportable windowing API, and poor integration with the operating system.

The Java language is similar in many ways to C++, being object-oriented but maintaining much flavor from C. Java distinguishes itself by removing much potentially confusing syntactic baggage, such as templates, multiple inheritence, default parameters, constructor initializers, and overloaded operators. Some simplifications of C++ were met with less enthusiastic acceptance, such as the decision to disallow all global declarations except for classes. Some solutions to C++'s inelegance are themselves quite elegant, such as the decision to ditch multiple inheritance in favor of single inheritance with interfaces. The Java language benefits from tight integration with its runtime library, having a single object hierarchy derived from java.lang.Object and a single exception hierarchy derived from java.lang.Throwable. Java borrows from the Smalltalk school in other ways as well: Java language does not have pointers in the same sense as C and C++, and its heap is garbage collected.

The platform side of Java, the Java Virtual Machine, or JVM, is based on a bytecode execution system: source code is compiled to portable bytecode files, which, theoretically, can be executed identically by any compliant JVM. While the standard for the bytecode execution facility itself is reasonably well-defined and static, the Java class library varies wildly from version to version. As a result, Java programs frequently failed to run on unexpected versions, displaying only terse messages like java.lang.ClassNotFoundException to a surprised end-user. The JVM is fairly loosely coupled to the language, so there are compilers that will compile to Java bytecode from languages other than Java. Similarly, there are compilers that will compile the Java language to native platforms, rather than the JVM.

Java source files usually have a ".java" suffix. When compiled, each class is encapsulated in its own class file, having a ".class" suffix. All class files particular to a project are linked together in a Java archive (JAR) file, having a ".jar" suffix, which can then be distributed to the user. JAR files actually borrow their format from ZIP files, meaning they can be opened and examined without any special tools. This, in addition to the fact that the Java bytecode is trivial to decompile (using any of several decompilers, but most famously Mocha) made Java an unsecure way to distribute code and therefore became another reason Java never had serious commercial backing as a desktop environment.

Java has its heart in the right place, and it has a lot of compelling attributes. In many places it is even breathtakingly elegent and occasionally profound. Unfortunately, Java is a piss-poor portable desktop application environment. Of the two windowing APIs Java supports, the Abstract Windowing Toolkit (AWT) and Swing, the former sacrifices control and can produce drastically different results on various host GUIs, and the latter, while quite powerful, eschews entirely the widgets of the underlying operating system and will always produce interfaces that look markedly different than native applications. In addition, Java sacrifices integration with the operating system in favor of portability, so there is no good, standard way for an end user to launch a Java application. Up until recently, end users may have had to deal with arcane, programmer-level details such as installing the Java Runtime Environment (JRE), setting a CLASSPATH environment variable, and manually invoking the Java interpreter for the command line. Initial implementations of Java in web browsers were, and still are, notoriously slow and buggy. Loading a web page that contained an applet often resulted in a several-minute wait while staring at the unhelpful message, "Starting Java..." Despite later enhancements such as Just-in-Time (JIT) compilation, Java's performance is still far less than comparable native code. Java's portability woes were increased by Sun's failure to release the source code for their Java execution environment. The only official Java environments were for Win32 and Sun's Solaris, making actual portability a casualty at the hands of market leverage. Sun's Java Development Kit (JDK) was another fine product that, if made open-source, could have greatly enhanced Java's portability and acceptance by developers.

Microsoft briefly flirted with its own Java virtual machine and development system, Visual J++, but when it attempted to embrace and extend Sun's prized standard by introducing its own Windows-specific Java APIs, Sun sued. Microsoft has since dropped any outward support for Java in favor of its .NET platform and C#.

Today, Java is used occasionally in obnoxious, slow-loading interactive banner ads. It's used more frequently in computer science classrooms, as it displaces Pascal or C++ among academics as the language initially used to terrify and confuse would-be programmers. And, partly because of the ease with which Java code can be written, and partly because of mature latter-day APIs like Enterprise JavaBeans (EJB), it makes an adequate platform for proprietary back-end code, filling a niche for projects too involved for the quick-and-dirty Perl but lighter than would require the just-plain-dirty C++.

Update 5 Aug 2002. In an attempt to migrate Java programmers to the new .NET architecture, Microsoft has introduced the ludicrously named J#, a compiler born of compromise. It seems to be a Java compiler that produces .NET bytecode rather than JVM. Its capacity to support Java libraries is unclear.