copyright

If your browser were Java-enabled, you would see the LissaDemo here.


THE LISSADEMO APPLET.
DRAWS RANDOM PATTERNS.

Java Review
OVERVIEW | DESIGN | J2EE | ENTERPRISE | MISC | RESOURCES



OVERVIEW


introduction | samples | timeline | standards | tools

Last updated: February 2005

These pages constitute an overview of Java, summarizing the major developments and applications of the language to the current time. Some general technical knowledge is assumed on the part of the reader. Use the navigation applet at the bottom of the page to reach the various sections of the review quickly. You can get a static version of the navigation control by clicking here.




introduction to the language

Java is an object-oriented language derived from C++ with strong support for networking, threading, and component-oriented development. Java source code is compiled to a form called bytecode which is platform-independent. The bytecode is stored in .class files which can, potentially, be transferred across a network to machines of different types, and then converted by each machine to its native machine code using a VM (Virtual Machine). The VM may do that either by interpreting the bytecode (classic model) or by compiling and running it method by method (when the VM incorporates a JIT — Just-In-Time compiler).

The key to Java's platform independence is simplicity. It achieves this by discarding some of C++ features and adding some of its own:

  • Java has no pointers.
  • Java does not have multiple inheritance. The same effect is achieved by implementing interfaces.
  • Java has no preprocessor (hence no macros).
  • Java does not allow global variables.
  • Java has a singly-rooted hierarchy. (Everything is descended from Object).
  • There is strong support for exception handling — the compiler checks to make sure exceptions are properly caught using Exception classes.
  • There is also strong support for multithreading — the Thread class allows the programmer to quickly create and control lightweight processes.

As Java is simpler and stricter than C++ it makes some compromises:

  • Java is slower than C++. Originally the VM would interpret the code line by line, and it could run as much as twenty times slower. Today most code is run with a JIT compiler such as Hotspot and may approach C++ speeds.
  • Low-level tasks must be done by interfacing with other languages — native methods.
  • An application (especially an applet) may be limited in what it can do over a network owing to Java's strong security model. In many ways this is a strength of course.

RESOURCES

Java design goals




samples

Here is a listing of the sample Java programs I have created and placed throughout these pages to illustrate the topics. Many of them are applets and can be run in IE and Netscape browsers. If you have any problems you can send a message to code@oranda.com with information on your browser, browser version, and operating system.


Name Type Compatibility View Now Documentation
OrandaNav Applet JDK 1.0 Run javadoc
LissaDemo Applet JDK 1.0 Run javadoc
Lissa Applet JDK 1.0 Run javadoc
TextScroll Applet JDK 1.1 Run javadoc
LucidDoc Application JDK 1.1 Screenshot Full description
OrChatApp (including OrChatClient and OrChatServer) Application JDK 1.1 Screenshot javadoc
SpeedSwitch Applet JDK 1.1 See beans section javadoc
PacDasher Application JDK 1.4 Screenshot Full description




timeline

timeline


RESOURCES

An early Java Review from June 1996 including more historical information.

Java Review from mid-1998

Java News from Elliotte Rusty Harold with archives 1998-2005




standards

The JDK (Java Development Kit) 1.0, released in January 1996, established the first major public Java standard, with a C++-like syntax and a hierarchy of classes including support for networking, streams, event handling, exception handling, and threads, and GUI development with the AWT (Abstract Windowing Toolkit). Soon afterwards the JDBC (Java Database Connectivity) classes were introduced as a means of communicating with databases.

The JDK 1.1 was a major advance, including the following major improvements:

  • JavaBeans — the component-oriented model.
  • New event model for the AWT.
  • Remote Method Invocation — a means for objects in different Java environments to call each other's methods.
  • Serialization — the ability for objects to be written to and read from files.
  • JAR (Java Archive) file support.
  • Localization support.
  • New native method interface.
  • Nested classes allowed.
  • Miscellaneous performance improvements.
  • Initial support for GUI data transfer between Java applications — the Clipboard and Drag-and-Drop classes.
  • Various other AWT impovements including classes for printing, accessing the user's desktop color scheme, support for "lightweight" windows, a class to help scrolling (ScrollPane) and a class for pop-up menus.
Of these improvements probably the most significant were the introduction of RMI, the new event model, and JavaBeans.

The JDK 1.2, released in December 1998, was an even greater advance. Java was no longer just Java but Java 2 (an umbrella term also used to cover subsequent releases such as 1.3, 1.4, and 5.0). Improvements included:

  • JFC (Java Foundation Classes): The Swing components — a full GUI toolkit to replace AWT components — and associated functionality such as drag-and-drop and the Accessibility API.
  • The Collections framework — a set of efficient data structures.
  • Addition of the Java 2D API
  • The Servlets standard extension and an Extension Architecture.
  • Enhancements to JDK 1.1 features such as JavaBeans, RMI, Serialization and JNI (Java Naming Interface)
  • General performance improvements.
1999 featured the graduation of a range of new APIs directed at both the enterprise and mobile devices. Consequently, Java was divided into three parts:
  • Java 2 Micro Edition (J2ME): Stripped-down Java for portable devices.
  • Java 2 Standard Edition (J2SE): The typical JDK.
  • Java 2 Enterprise Edition (J2EE): Full-blown enterprise Java, centering around the EJB component model.

The J2SE 1.3 (i.e. JDK 1.3) was not as big a release as previous ones. It featured a broad range of incremental improvements, including the introduction of Timer and TimerTask, increased CORBA support such as RMI over IIOP, introduction of a new Sound API, and the relocation of JNDI to the core API.

The J2SE 1.4, released in 2002, again had a lot of incremental improvements and the migration of javax libraries to the core platform. Features included:

  • An assertion facility added to the Java language itself.
  • Support for exception chaining.
  • New I/O capabilities related to scalability, logging, and regular expressions.
  • Numerous enhancements to Swing.
  • Java API for XML Processing integrated.
  • Security APIs such as ones for cryptography and authentication integrated.
  • New Web Start tool to enable launching of Java applications (not just applets) from the browser and help with caching and JVM version management.

In 2004 J2SE 5.0 (renamed from J2SE 1.5) was a great release, around the same importance as J2SE 1.2. There were not only API changes but fundamental simplifications to the syntax of the language. The major new features of 5.0 were:

  • Generics: a way at last of constraining the types in Collections, using the new angle brackets syntax. Generics were already a popular feature in other programming languages such as C++ and Ada.
  • Annotations: metadata added to source code so it can be processed by tools.
  • More concise for loop. Iterators now rarely have to be explicit.
  • Enums. Formerly, defining enumerations had been long-winded; now a special keyword supports them.
  • Varargs: you can now use ... in parameter lists to support any number of arguments.
  • Autoboxing and unboxing: make conversions between primitives and wrapper types implicit.
  • Static imports, printf-style formatting, Queue classes and new threading classes.

RESOURCES

JDK 1.1 features (from JavaWorld)

JDK 1.2 features (from Sun)

JDK 1.2 features (from JavaWorld)

J2SE 1.3 features (from Sun)

J2SE 1.4 features (overview from Sun)

J2SE 5.0 in a Nutshell from the Tiger tech lead at Sun




tools

Java's fundamental toolkit is the JDK, the latest version of which can be downloaded from Sun. As well as the VM, this includes command-line tools for compiling, debugging, creating documentation from source code comments (javadoc), creating compressed archives (JARs), and so on.

Java programs can be written using any text editor, and frequently are. However, an IDE (Integrated Development Environment) is a useful tool for creating applications, because it lets you execute many common associated tasks (like compiling and running) by point-and-click, and provides many features like debugging and organizing projects. On the downside, there is some overhead involved in learning and maintaining your IDE, and the danger that you may become "locked into it" as you develop.

One popular IDE is Eclipse, written with IBM's SWT classes. I find it to be generally a bit faster and more usable than Sun's NetBeans (the successor to Forte).



Eclipse, NetBeans, IntelliJ IDEA and JBuilder are all frequently used IDEs.

RESOURCES

Eclipse home page

Java IDE comparison for 2004