5.5 Java

The first few years of what would eventually be known as Java were difficult. Sun Microsystems, the owner of the technology, initially struggled to find a market for its technology. When the company failed to find a niche in TV set-top boxes in the middle of the 1990s, it turned to the emergent World Wide Web. A deal was struck with Netscape, a maker of web browsers, to bundle the Java technology with their products. Through small programs running within the confines of a web browser, known as applets, Java enabled interactivity and animation on what was then a largely static Web (Bank 1995; Byous 1998).

Today, Java enjoys considerable success in the enterprise space with its Enterprise Edition. This edition provides a component model known by the name of its components—Enterprise JavaBeans (EJBs).1 EJBs give access to many of the enterprise services enumerated in section 1.7, such as declarative handling of database transactions. The Micro Edition of Java is used in the embedded space, and is commonly run on cellular phones, powering many of the downloadable applications and games on Java-compatible phones. A variety of solutions exist for running Java code, partly or fully, directly on embedded hardware platforms where it may not be practical to use just-in-time compilation (Libby and Kent 2009). The Standard Edition runs on desktop machines, and provides a large number of standard libraries, including ones that allow programmers to create graphical user interfaces. Java applets are still used by modern web sites, but perhaps not to the extent originally envisioned. Sun released most of the Java code under an open-source license in 2007.

Java is an object-oriented language supporting exceptions and parameterized types (generics). Java programs are typically compiled to machine code (bytecode) for a stack-based virtual machine, known as a Java Virtual Machine (JVM). The virtual machine implementation may interpret all bytecode, but most contemporary implementations compile at least some of the bytecode to native code to speed execution (using just-in-time compilation).2 This has the benefit of enabling Java programs to run on any platform for which a JVM implementation exists. Java provides a strong security infrastructure, which ensures that untrusted code, such as applets, can be safely allowed to run.

Footnotes

  1. Java also comes with a technology named JavaBeans, which is unrelated to Enterprise JavaBeans. Such JavaBeans are at their core ordinary Java objects that follow certain conventions, making it possible to customize their properties in visual tools. JavaBeans are touted as components, but are not compatible with the view of software components adopted by this thesis.
  2. Third-party solutions exist that enable ahead-of-time compilation, such as GNU’s GCJ.