Java8

So Why Use Java?

The Java programming language is platform independent and can be run in a wide variety of environments. This is achieved via the Java compiler which converts a document into Java bytecode, which is a highly optimized set of instructions designed to be executed by the Java run time system which is more commonly known as the Java Virtual Machine or JVM for short. In essence the JVM is an interpreter for the Java bytecode and as such, when implemented on a platform can run any Java bytecode on that platform. So although the implementation of the JVM may differ from platform to platform the underlying bytecode is always the same. This flexibility is what makes the Java language so portable.

The use of the JVM also makes the use of Java more secure as the JVM acts like a firewall between the application and a computer. All Java programs are under the control of the JVM and as such the JVM can stop adverse side effects propogating outside the system.

Concerns in early releases of Java over the speed the language runs at, because it is an interpreted language, have since subsided as the JVM has been streamlined and improved. The advantages of portability and security have placed Java at the top of the tree of object oriented programming languages and is why the language is used in so many diverse applications today.

Cutting through the jargon

Like any programming language Java comes with plenty of jargon, the table below gives the names of commonly used terms, their acronyms and an explanation of what they mean.


Name Acronym What it Means
Java Development KitJDKPackage of tools for developing software in Java.
Java Runtime EnvironmentJREPackage of tools for running software in Java.
Java Virtual MachineJVMPlatform component for running Java programs.
Standard EditionSEJava platform for development and deployment of portable code for desktop and simple server environments.
Enterprise EditionEEJava platform for development and deployment of complex server environments.
Micro EditionMEJava platform for development and deployment of portable code for mobile phones and other small devices.
UpdateuTerm used by Oracle for a bug fix release.
  • The JDK allows us to develop Java programs and includes various executables such as the Java compiler.
  • The JDK also includes the JRE to allow us to run the Java programs we are developing.
  • The JRE can also be used as a standalone component for just running Java programs.
  • When executed the JRE will instantiate a JVM for the Java program in question to run on.

Figure 1. should make these concepts easier to understand:

jdk diagram
Figure 1. Compiling and running a Java program.

Java Evolution

Java is an object oriented programming language and computing platform that was first released by Sun Microsystems in early 1996 and has grown in popularity ever since. The Java language has gone through a lot of changes during its evolution and the table below outlines the major releases up to Java8. Just as an aside the codenames were stopped after Java 7.


Release Name And Date Codename Known As ≈ Number Of Classes
JDK 1.0 (January 23, 1996)OakJava 1250
JDK 1.1 (February 19, 1997)Java 1500
J2SE 1.2 (December 8, 1998)PlaygroundJava 21600+
J2SE 1.3 (May 8, 2000)KestrelJava 21800+
J2SE 1.4 (February 6, 2002)MerlinJava 22700+
J2SE 5.0 (September 30, 2004)TigerJava 5.03200+
Java SE 6 (December 11, 2006)MustangJava 63700+
Java SE 7 (July 28, 2011)DolphinJava 74000+
Java SE 8 (March 18, 2014)Java 84200+

The release names in the table are somewhat confusing so lets go through them. In the first two versions the JDK stands for Java Developers Kit and these versions were knows as Java 1. With the release of J2SE 1.2, because the changes were so large this version through J2SE 5.0 were prefixed with J2SE (Java 2 Platform, Standard Edition). The J2 denoting Java 2 and the SE to distinguish the standard edition platform from J2EE (Java 2 Platform, Enterprise Edition) and J2ME (Java 2 Platform, Micro Edition). Things got even more confusing with the release of J2SE 5.0 which also included changes large enough that it became known as Java 5.0 even though in reality it was version 1.5. So Java 1.5, Java 5.0 and Java 5 all refer to this release (there was never a Java 3 or Java 4). From version Java SE 6 onwards the J2 prefix and the .0 suffix were dropped and versions were simply known as Java 6, Java 7... from then onwards and we will be using this naming convention from now on.

What's Next?

In our first lesson on Java we download the latest JDK from the Oracle site and setup our environment. We then check that everything is working as it should by running a check to see if the Java compiler can be accessed from the command line.

All the major sections of the site are listed below.
Click a link to go to that section.

Fundamentals

Objects & Classes

OO Concepts

Exceptions

API Contents

Input & Output

Collections

Generics

Streams

Concurrency

Swing & RMI

Case Study

Certification

Quizzes