5.1.1 Java

Java started out as a language (Oak) developed for embedded system usage, with an objective of providing a portable environment that could be used on a range of projected set top boxes. It was essentially derived from C++, providing powerful object-oriented features such as classes to combine code and data, and single inheritance, while simplifying greatly to remove the more complex constructs such as pointers and multiple inheritance that led to reliability issues.

C and C++ programs had been the mainstay of systems and applications programmers, but the reliability of a C or C++ program cannot be verified for correctness because the pointers contain memory addresses and not data or objects that can be checked until runtime. So, to overcome the verification issue and provide a base for portability, the "virtual machine" concept was utilized.

Virtual machines provide a consistent machine architecture interface to the software it runs, while having a lower level that is ported transparently to different hardware. Java also introduced the system level concept of threads into the language itself, to allow multiple "concurrent threads of execution" to be specified within the language rather than forcing system-specific extensions to be used that would limit portability.

Java soon proved its use in the arena of the Internet as the power behind applets that provided the initial dynamicism for previously static Web sites. Applets run in the client inside the Web browser Java sandbox, which limits their usefulness because they have to be downloaded and can lead to large amounts of data traveling between the client and the server when anything powerful is needed.

At the time, C and scripted CGI programs were being used to provide server side dynamicism for Web sites by allowing the Web server to run external programs and receive the response using environmental variables and the system environment; however, these approaches had scalability issues which limited their usefulness.

Into this historical context, server-side Java was introduced to allow a server-side Java virtual machine to map Web requests to threads running code to a particular standard called the "servlet". This was the beginning of Java2 Extended Edition, or J2EE (which is being renamed to JavaEE in the next release).