Java (software platform)

Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers.

Java syntax borrows heavily from C and C++, but object-oriented features are modeled after Smalltalk and Objective-C.[13] Java eschews certain low-level constructs such as pointers and has a very simple memory model where objects are allocated on the heap (while some implementations e.g. all currently supported by Oracle, may use escape analysis optimization to allocate on the stack instead) and all variables of object types are references.

The Java Runtime Environment (JRE), complementing the JVM with a just-in-time (JIT) compiler, converts intermediate bytecode into native machine code on the fly.

The use of a JIT compiler means that Java applications, after a short delay during loading and once they have "warmed up" by being all or mostly JIT-compiled, tend to run about as fast as native programs.

Meanwhile, most modern smartphones, tablet computers, and other handheld PCs that run Java apps are most likely to do so through support of the Android operating system, which includes an open source virtual machine incompatible with the JVM specification.

Instead, the Java platform provides a comprehensive set of its own standard class libraries containing many of the same reusable functions commonly found in modern operating systems.

The java.net and java.io libraries implement an abstraction layer in native OS code, then provide a standard interface for the Java applications to perform those tasks.

Like the JVM, the CLR provides memory management through automatic garbage collection, and allows .NET byte code to run on multiple operating systems.

Engineer Patrick Naughton had become increasingly frustrated with the state of Sun's C++ and C application programming interfaces (APIs) and tools, as well as with the way the NeWS project was handled by the organization.

The language's lack of garbage collection meant that programmers had to manually manage system memory, a challenging and error-prone task.

Bill Joy had envisioned a new language combining Mesa and C. In a paper called Further, he proposed to Sun that its engineers should produce an object-oriented environment based on C++.

Initially, Gosling attempted to modify and extend C++ (a proposed development that he referred to as "C++ ++ --") but soon abandoned that in favor of creating a new language, which he called Oak, after the tree that stood just outside his office.

In November of that year, the Green Project was spun off to become Firstperson, a wholly owned subsidiary of Sun Microsystems, and the team relocated to Palo Alto, California.

In June and July 1994 – after three days of brainstorming with John Gage (the Director of Science for Sun), Gosling, Joy, Naughton, Wayne Rosing, and Eric Schmidt – the team re-targeted the platform for the World Wide Web.

They felt that with the advent of graphical web browsers like Mosaic the Internet could evolve into the same highly interactive medium that they had envisioned for cable TV.

On November 13, 2006, Sun Microsystems made the bulk of its implementation of Java available under the GNU General Public License (GPL).

Major additions included an extensive retooling of the Abstract Window Toolkit (AWT) event model, inner classes added to the language, JavaBeans, and Java Database Connectivity (JDBC).

Major additions included reflection, a collections framework, Java IDL (an interface description language implementation for CORBA interoperability), and the integration of the Swing graphical API into the core classes.

[57] Major changes included regular expressions modeled after Perl, exception chaining, an integrated XML parser and XSLT processor (JAXP), and Java Web Start.

[58] Developed under JSR 176, Tiger added several significant new language features including the for-each loop, generics, autoboxing and var-args.

[61] It added many small language changes including strings in switch, try-with-resources and type inference for generic instance creation.

[citation needed] Apple no longer includes a Java runtime with OS X as of version 10.7, but the system prompts the user to download and install it the first time an application requiring the JRE is launched.

[78] Some Java applications are in fairly widespread desktop use, including the NetBeans, Eclipse and JetBrains[79] integrated development environments, and file sharing clients such as LimeWire and Vuze.

[86] While several third-party projects (e.g. GNU Classpath and Apache Harmony) created free software partial Java implementations, the large size of the Sun libraries combined with the use of clean room methods meant that their implementations of the Java libraries (the compiler and VM are comparatively small and well defined) were incomplete and not fully compatible.

Sun's goal was to replace the parts that remain proprietary and closed-source with alternative implementations and make the class library completely free and open source.

The Java platform provides a security architecture[112] which is designed to allow the user to run untrusted bytecode in a "sandboxed" manner to protect against malicious or poorly written software.

In recent years, researchers have discovered numerous security flaws in some widely used Java implementations, including Oracle's, which allow untrusted code to bypass the sandboxing mechanism, exposing users to malicious attacks.

On August 31, 2012, Java 6 and 7 (both supported back then) on Microsoft Windows, OS X, and Linux were found to have a serious security flaw that allowed a remote exploit to take place by simply loading a malicious web page.

[119] This exploit hole prompted a response from the United States Department of Homeland Security encouraging users to disable or uninstall Java.

Java has yet to release an automatic updater that does not require user intervention and administrative rights[125] unlike Google Chrome[126] and Flash player.

TuxGuitar , a Java-powered program
James Gosling
John Gage
A Java program running on a Windows Vista desktop (supported by Java 8, but not officially by later versions, such as Java 11) desktop computer
Plain ol' Duke