What is Java?
Java was first developed by Sun Microsystems in 1995, and, as of 2010, it is owned by Oracle. Java is an object-oriented programming and computer language designed to let application developers “write once, run anywhere” which means that compiled Java code can run on any platform that supports it.
The platform was written under the 5 primary Java principles:
- 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
These 5 primary Java principles were to ensure that the language received as much coverage as possible, and the success of the Java platform would be seen. Success is evident in the fact that it powers millions of applications and websites, ranging from software on Android mobile phones to set-top boxes and well-known websites such as Amazon, eBay and the Tesco website.
The Java Platform
As one of the main driving goals to Java was portability, this ensures that a Java program will run on any setup of hardware and operating systems. To achieve this, the Java platform consists of several elements that contribute to the wider Java platform. These consist of:
- JVM – Java Virtual Machine
- JRE – Java Runtime Environment
- Java Compiler
- Class Libraries
If you are working with Java as a Developer, you will also need the additional JDK (Java Development Kit) to compile the code that is being written. These are all freely available from the official Java website.
Controversy and Criticism
Although Java is widely used throughout the web and application development, it is not without its controversy. Due to the nature of the language it has been particularly open for criticism since 1995, particularly around the security of the language. The language currently runs in a “sandbox” which is used to protect the user by restricting the access to platform features and API’s. This could open up a system to be exploited by malware.
In recent years, extensive research has been conducted into the security of the language, and it has been found that previous versions of Java, dating back as far as Java 5, have been flawed. This has meant that there are many instances of security breaches in the language itself. This has led to many computer security experts to speak out against the use of Java in computing and programming.
Java has also seen controversy in regards to the Android operating system for mobile devices. This led to a legal dispute between Oracle and Google in 2012, where it was found that Google may have infringed on Oracle’s copyright by including Java in Android Devices. This matter was eventually resolved on 26th May 2016 where the district court ruled in favour of Google, stating that the copyright infringement on the use of Java within Android constitutes fair use.
As Linux has the penguin, Java also has a mascot in the form of Duke. The original version of Duke looks like the following:
Several Dukes have been created over the years, and Oracle, who now own the Java platform have created a unique Duke every year, ranging from “Surfing Duke” to “Future Tech Duke”.
Java Hello World Example
As with most computer and programming languages, the most basic application a developer will make will be the “Hello World” example. Below, you can see the syntax of the Java platform, and the code related to printing “Hello World!”
public static void main(String args)
As of writing, the Java platform is currently on its 8th release, Java SE 8 that was released on the 8th March 2014.