The Java Software Platform was an idea born out of the defunct Sun Microsystems to create a software framework and API that is, for all intents and purposes, universal. The idea was that a developer could write the software once, then run it anywhere, a philosophy Sun dubbed "Write Once, Run Anywhere (WORA)". Initially it was developed for interactive television software but was deemed too advanced at the time. Instead, Sun developed Java to be scalable, running on everything from server farms down to small smart cards.
For simplicity of this article, the Java Software Platform breaks down into two major components: The Java programming language and the Java virtual machine. A more in-depth view of the language can be found on the Java Programming Language page.
The Java Programming LanguageThe programming language itself was developed based on C++. Originally C++ was going to be used as the language for the software platform, but found it lacking in some areas that Sun wanted such as memory consumption and management. So Sun made their own with these goals in mind:
- It must be "simple, object-oriented, and familiar".
- It must be "robust and secure".
- It must be "architecture-neutral and portable".
- It must execute with "high performance".
- It must be "interpreted, threaded, and dynamic".
Though it can be argued that Sun achieved many of these points, one of the goals that Sun wanted and achieved to great success was the idea of the "Write Once, Run Anywhere." That is, Java source files are not compiled for the target machine. So they are not converted into executables for Intel x86, Motorola 68000, or ARM. Instead, they are compiled into what is called 'bytecode', which for all intents and purposes is a type of machine language code. The difference is the machine doesn't actually exist. The 'bytecode' is read by the other component of the Java Software Platform to be run on the target system. This system however is not unique to Java, nor did Sun invent it.
Java applications themselves are usually packed in Java Archive (JAR) files. If one has a Java system platform installed on the OS, the default action is to execute the JAR file. Otherwise, one can open the JAR file in a archive manager that can handle the .zip extension and view or modify the source code and assets from there. This is a common way to add mods and hacks to Minecraft, a well known Java application.
As a bit of historical info, originally it was called Oak after a tree in front of the main developers office. Then it went to Green as it was the project's codename before finally settling on Java after the coffee type (insert joke about how much software developers need their coffee).
The Java Virtual Machine (JVM)The Java Virtual Machine, or JVM, is what runs the actual Java language compiled bytecode on the system. From a 10,000 foot point of view, this is what converts the bytecode into the target system's machine language to run. This system is known as Just-In-Time compiling. Since the implementation details of the JVM are more or less a standard, anyone can develop their own. Though the one most people are familiar with is the "official" one from Oracle, who now maintains the Java Software Platform.
The Java Software Platform influenced Microsoft to create the Common Language Infrastructure. Microsoft's implementation of it, known as the .NET Framework, uses several programming languages that are compiled into an intermediate form before another program executes the program for the target system.
The Java language itself is also the main language for Android application development. However, Android does not use the Java Virtual Machine to execute the code. Rather Google developed its own platform called Davlik, and later Android Run Time, to run the code. This got Google in hot water with Oracle when Oracle acquired Sun as the first thing Oracle did was file a lawsuit against Google. Also, the usage of Java language but not the virtual machine has caused confusion with some technology geeks thinking Google is dumb for using a system that's known for its security vulnerabilities (only the JVM has issues, the language itself does not).