Java (software platform)
Java is a set of computer software and specifications that provides a software platform for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.
Writing in the Java programming language is the primary way to produce code that will be deployed as byte code in a Java virtual machine ; byte code compilers are also available for other languages, including Ada, JavaScript, Kotlin, Python, and Ruby. In addition, several languages have been designed to run natively on the JVM, including Clojure, Groovy, and Scala. Java syntax borrows heavily from C and C++, but object-oriented features are modeled after Smalltalk and Objective-C. Java eschews certain low-level constructs such as pointers and has a very simple memory model where objects are allocated on the heap and all variables of object types are references. Memory management is handled through integrated automatic garbage collection performed by the JVM.
Latest version
The latest version is Java 25 released in September 2025, the latest long-term support version. It is one of a few LTS versions still supported, down to Java 8 LTS. Oracle extended support for Java 6 ended in December 2018. As an open source platform, Java has many distributors, including Amazon, IBM, Azul Systems, and AdoptOpenJDK. Distributions include Amazon Corretto, Zulu, AdoptOpenJDK, and Liberica. Regarding Oracle, it distributes Java 8, and also makes available e.g. Java 11, both also currently supported LTS versions. Oracle "highly recommend that you uninstall older versions of Java" than Java 8, because of serious risks due to unresolved security issues. Since Java 9 are no longer supported, Oracle advises its users to "immediately transition" to a supported version. Oracle released the last free-for-commercial-use public update for the legacy Java 8 LTS in January 2019, and will continue to support Java 8 with public updates for personal use indefinitely.Platform
The Java platform is a suite of programs that facilitate developing and running programs written in the Java programming language. A Java platform includes an execution engine, a compiler and a set of libraries; there may also be additional servers and alternative libraries that depend on the requirements. Java platforms have been implemented for a wide variety of hardware and operating systems with a view to enable Java programs to run identically on all of them.The Java platform consists of several programs, each of which provides a portion of its overall capabilities. For example, the Java compiler, which converts Java source code into Java bytecode, is provided as part of the Java Development Kit. The Java Runtime Environment, complementing the JVM with a just-in-time compiler, converts intermediate bytecode into native machine code on the fly. The Java platform also includes an extensive set of libraries.
The essential components in the platform are the Java language compiler, the libraries, and the runtime environment in which Java intermediate bytecode executes according to the rules laid out in the virtual machine specification.
Application domains
Different platforms target different classes of device and application domains:- Java Card: A technology that allows small Java-based applications to be run securely on smart cards and similar small-memory devices.
- Java ME : Specifies several different sets of libraries for devices with limited storage, display, and power capacities. It is often used to develop applications for mobile devices, PDAs, TV set-top boxes, and printers.
- Java SE : For general-purpose use on desktop PCs, servers and similar devices.
- Jakarta EE : Java SE plus various APIs which are useful for multi-tier client–server enterprise applications.
Java SE
Jakarta EE
Java virtual machine
The heart of the Java platform is the "virtual machine" that executes Java bytecode programs. This bytecode is the same no matter what hardware or operating system the program is running under. However, new versions, such as for Java 10, have made small changes, meaning the bytecode is in general only forward compatible. There is a JIT compiler within the Java Virtual Machine, or JVM. The JIT compiler translates the Java bytecode into native processor instructions at run-time and caches the native code in memory during execution.The use of bytecode as an intermediate language permits Java programs to run on any platform that has a virtual machine available. 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.
Since JRE version 1.2, Sun's JVM implementation has included a just-in-time compiler instead of an interpreter.
Although Java programs are cross-platform or platform independent, the code of the Java Virtual Machines that execute these programs is not. Every supported operating platform has its own JVM.
Java Development Kit
Java Runtime Environment
The Java Runtime Environment released by Oracle is a freely available software distribution containing a stand-alone JVM, the Java standard library, a configuration tool, and—until its discontinuation in JDK 9—a browser plug-in. It is the most common Java environment installed on personal computers in the laptop and desktop form factor. Mobile phones including feature phones and early smartphones that ship with a JVM are most likely to include a JVM meant to run applications targeting Micro Edition of the Java platform. 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.The last Critical Path Update version of JRE with an Oracle BCL Agreement was 8u201 and, the last Patch Set Update version with the same license was 8u202. The last Oracle JRE implementation, regardless of its licensing scheme, was 9.0.4. Since Java Platform SE 9, the whole platform also was grouped into modules. The modularization of Java SE implementations allows developers to bundle their applications together with all the modules used by them, instead of solely relying on the presence of a suitable Java SE implementation in the user device.
Class libraries
In most modern operating systems, a large body of reusable code is provided to simplify the programmer's job. This code is typically provided as a set of dynamically loadable libraries that applications can call at runtime. Because the Java platform is not dependent on any specific operating system, applications cannot rely on any of the pre-existing OS libraries. 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. Most of the system library is also written in Java. For instance, the Swing library paints the user interface and handles the events itself, eliminating many subtle differences between how different platforms handle components.The Java class libraries serve three purposes within the Java platform. First, like other standard code libraries, the Java libraries provide the programmer a well-known set of functions to perform common tasks, such as maintaining lists of items or performing complex string parsing. Second, the class libraries provide an abstract interface to tasks that would normally depend heavily on the hardware and operating system. Tasks such as network access and file access are often heavily intertwined with the distinctive implementations of each platform. 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. Finally, when some underlying platform does not support all of the features a Java application expects, the class libraries work to gracefully handle the absent components, either by emulation to provide a substitute, or at least by providing a consistent way to check for the presence of a specific feature.Languages
The word "Java", alone, usually refers to Java programming language that was designed for use with the Java platform. Programming languages are typically outside of the scope of the phrase "platform", although the Java programming language was listed as a core part of the Java platform before Java 7. The language and runtime were therefore commonly considered a single unit. However, an effort was made with the Java 7 specification to more clearly treat the Java language and the Java Virtual Machine as separate entities, so that they are no longer considered a single unit.Third parties have produced many compilers or interpreters that target the JVM. Some of these are for existing languages, while others are for extensions to the Java language. These include:
- BeanShell – a lightweight scripting language for Java
- Ceylon – an object-oriented, strongly and statically typed programming language with an emphasis on immutability
- Clojure – a modern, dynamic, and functional dialect of the Lisp programming language on the Java platform
- Gosu – a general-purpose JVM-based programming language released under the Apache License 2.0
- Groovy – a fully Java-interoperable, Java-syntax-compatible, static and dynamic language with features from Python, Ruby, Perl, and Smalltalk
- JRuby – a Ruby interpreter
- Jython – a Python interpreter
- Kotlin – a programming language for a JVM with full Java interoperability
- Rhino – a JavaScript interpreter
- Scala – a multi-paradigm programming language with non-Java compatible syntax designed as a "better Java"