Hubbry Logo
Java (software platform)Java (software platform)Main
Open search
Java (software platform)
Community hub
Java (software platform)
logo
8 pages, 0 posts
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something
Java (software platform)
Java (software platform)
from Wikipedia

Java (software platform)
Original authorsJames Gosling, Sun Microsystems
DeveloperOracle Corporation
Initial releaseJanuary 23, 1996; 29 years ago (1996-01-23)[1][2]
Stable release25 LTS (September 16, 2025; 55 days ago (2025-09-16)[3]) [±]

21.0.5 LTS (October 15, 2024; 12 months ago (2024-10-15)[4]) [±]
17.0.13 LTS (October 15, 2024; 12 months ago (2024-10-15)[5]) [±]
11.0.25 LTS (October 15, 2024; 12 months ago (2024-10-15)[6]) [±]

8u431 LTS (October 15, 2024; 12 months ago (2024-10-15)[7]) [±]
Written inJava, C++, C, assembly language[8]
Operating systemMicrosoft Windows 10+, Linux, macOS,[9] and for old versions: Solaris
Platformx64, ARMv8, and for old versions: ARMv7, IA-32, SPARC (up to Java 14) (Java 8 includes 32-bit support for Windows – while no longer supported freely by Oracle for commercial use)[9]
Available inEnglish, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish, Swedish[10]
TypeSoftware platform
LicenseDual-license: GNU General Public License version 2 with classpath exception,[11] and a proprietary license.[12]
Website
TuxGuitar, a Java-powered program

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 (JVM); byte code compilers are also available for other languages, including Ada, JavaScript, Kotlin (Google's preferred Android language), 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.[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. Memory management is handled through integrated automatic garbage collection performed by the JVM.

Latest version

[edit]

The latest version is Java 25 released in September 2025, the latest long-term support (LTS) 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.[14] 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 (and others) "highly recommend that you uninstall older versions of Java" than Java 8,[15] because of serious risks due to unresolved security issues.[16][17][18] Since Java 9 (as well as versions 10, 12–16, 18–20, and 22–24) 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

[edit]

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 (called a virtual machine), 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 (an intermediate language for the JVM), is provided as part of the Java Development Kit (JDK). 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 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

[edit]

Different platforms target different classes of device and application domains:

  • Java Card: A technology that allows small Java-based applications (applets) to be run securely on smart cards and similar small-memory devices.
  • Java ME (Micro Edition): Specifies several different sets of libraries (known as profiles) 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 (Standard Edition): For general-purpose use on desktop PCs, servers and similar devices.
  • Jakarta EE (Enterprise Edition): Java SE plus various APIs which are useful for multi-tier client–server enterprise applications.

Java SE

[edit]

Java Platform, Standard Edition (Java SE) is a computing platform for development and deployment of portable code for desktop and server environments.[19] Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).

The platform uses the Java programming language and is part of the Java software-platform family. Java SE defines a range of general-purpose APIs—such as Java APIs for the Java Class Library—and also includes the Java Language Specification and the Java Virtual Machine Specification.[20] OpenJDK is the official reference implementation since version 7.[21][22][23]

Jakarta EE

[edit]
Jakarta EE, formerly Java Platform, Enterprise Edition (Java EE) and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE[24] with specifications for enterprise features such as distributed computing and web services.[25] Jakarta EE applications are run on reference runtimes, which can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components they are deploying.

Java virtual machine

[edit]

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 (and earlier), have made small changes, meaning the bytecode is in general only forward compatible. There is a JIT (Just In Time) 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.[26][27][28] 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 (JVM) that execute these programs is not. Every supported operating platform has its own JVM.

Java Development Kit

[edit]

The Java Development Kit (JDK) is a distribution of Java technology by Oracle Corporation. It implements the Java Language Specification (JLS) and the Java Virtual Machine Specification (JVMS) and provides the Standard Edition (SE) of the Java Application Programming Interface (API). It is derivative of the community driven OpenJDK which Oracle stewards.[29] It provides software for working with Java applications. Examples of included software are the Java virtual machine, a compiler, performance monitoring tools, a debugger, and other utilities that Oracle considers useful for Java programmers.

Oracle releases the current version of the software under the Oracle No-Fee Terms and Conditions (NFTC) license. Oracle releases binaries for the x86-64 architecture for Windows, macOS, and Linux based operating systems, and for the aarch64 architecture for macOS and Linux. Previous versions supported the Oracle Solaris operating system and SPARC architecture.

Oracle's primary implementation of the JVMS is known as the HotSpot (virtual machine).

Java Runtime Environment

[edit]

The Java Runtime Environment (JRE) released by Oracle is a freely available software distribution containing a stand-alone JVM (HotSpot), the Java standard library (Java Class 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. (Instead, Google's Android development tools take Java programs as input and output Dalvik bytecode, which is the native input format for the virtual machine on Android devices.) The last Critical Path Update version of JRE with an Oracle BCL Agreement[30] was 8u201 and, the last Patch Set Update version with the same license was 8u202.[31][32] The last Oracle JRE implementation, regardless of its licensing scheme, was 9.0.4.[33] Since Java Platform SE 9, the whole platform also was grouped into modules.[34] 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.[35][36][37][38]

Class libraries

[edit]

In most modern operating systems (OSs), 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

[edit]

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.[39]

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[40] (see also JShell)
  • Ceylon – an object-oriented, strongly and statically typed programming language with an emphasis on immutability (and is no longer maintained since 2023)
  • 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 (and non-JVM, for e.g. desktop and iOS) with full Java interoperability (Google's preferred language for Android, its JVM, over Java, which is also still supported there and it previously promoted)
  • Rhino – a JavaScript interpreter
  • Scala – a multi-paradigm programming language with non-Java compatible syntax designed as a "better Java"

Similar platforms

[edit]

The success of Java and its write once, run anywhere concept has led to other similar efforts, notably the .NET Framework, appearing since 2002, which incorporates many of the successful aspects of Java. .NET was built from the ground-up to support multiple programming languages, while the Java platform was initially built to support only the Java language, although many other languages have been made for JVM since. Like Java, .NET languages compile to byte code and are executed by the Common Language Runtime (CLR), which is similar in purpose to the JVM. Like the JVM, the CLR provides memory management through automatic garbage collection, and allows .NET byte code to run on multiple operating systems.

.NET included a Java-like language first named J++, then called Visual J# that was incompatible with the Java specification. It was discontinued 2007, and support for it ended in 2015.

Performance

[edit]

The JVM specification gives a lot of leeway to implementors regarding the implementation details. Since Java 1.3, JRE from Oracle contains a JVM called HotSpot. It has been designed to be a high-performance JVM.

To speed-up code execution, HotSpot relies on just-in-time compilation. To speed-up object allocation and garbage collection, HotSpot uses generational heap.

Generational heap

[edit]

The Java virtual machine heap is the area of memory used by the JVM for dynamic memory allocation.[41]

In HotSpot the heap is divided into generations:

  • The young generation stores short-lived objects that are created and immediately garbage collected.
  • Objects that persist longer are moved to the old generation (also called the tenured generation). This memory is subdivided into (two) Survivors spaces where the objects that survived the first and next garbage collections are stored.

The permanent generation (or permgen) was used for class definitions and associated metadata prior to Java 8. Permanent generation was not part of the heap.[42][43] The permanent generation was removed from Java 8.[44]

Originally there was no permanent generation, and objects and classes were stored together in the same area. But as class unloading occurs much more rarely than objects are collected, moving class structures to a specific area allowed significant performance improvements.[42]

Security

[edit]

The Java JRE is installed on a large number of computers. End users with an out-of-date version of JRE therefore are vulnerable to many known attacks. This led to the widely shared belief that Java is inherently insecure.[45] Since Java 1.7, Oracle's JRE for Windows includes automatic update functionality.

Before the discontinuation of the Java browser plug-in, any web page might have potentially run a Java applet, which provided an easily accessible attack surface to malicious web sites. In 2013, Kaspersky Labs reported that the Java plug-in was the method of choice for computer criminals. Java exploits are included in many exploit packs that hackers deploy onto hacked web sites.[46] Java applets were removed in Java 11, released on September 25, 2018.

Java versions

[edit]
Java
version
Year Changes
25 2025 A Long-Term Support (LTS) release
21 2023 A Long-Term Support (LTS) release
17 2021 An LTS release, has several enhancements, provides pattern matching for switch statements and sealed classes
16 2021 Introduced record classes, pattern matching, and sealed classes for enhanced data modelling abilities
15 2020 Introduced text blocks, sealed classes as preview features, enhancing string and class handling
14 2020 Introduced new features record classes and pattern matching for instanceof as preview features
13 2019 Included enhancements, text blocks, reimplementation of legacy Socket API
12 2019 Introduced switch expressions, new Shenandoah garbage collector
11 2018 An LTS release, introduced new HTTP client, removed Java EE and CORBA modules
10 2018 Introduced Local-Variable Type Inference (var), allows declaring local variables without specifying type
9 2017 Introduced Java Platform Module System (JPMS) for modularizing applications, JShell interactive Java REPL
8 2014 Major release, introduced Lambda Expressions, new Date and Time API for better productivity
7 2011 Introduced try-with-resources, Switch on String, Diamond Operator, included expanded exception handling, new file I/O library (NIO.2)
6 2006 Introduced Scripting Language Support (JSR 223), Web Service Enhancements, provided JDBC 4.0 with SQL XML support
5 2004 Significant release, included Generics, an Enhanced for Loop, Autoboxing/Unboxing, Static Import, Varargs, Enumerations, Annotations
4 2002 Introduced Regular Expressions, Exception Chaining, new set of I/O APIs named NIO (New Input/Output), new Logging API
3 2000 Included new Sun JVM named HotSpot, introduced Java Naming and Directory Interface (JNDI), Java Platform Debugger Architecture (JPDA)
2 1998 Introduced Collections Framework, Java String memory map for constants, a Just In Time (JIT) compiler, and Swing API for GUIs
1.1 1997 Introduced Inner Classes, Reflection, Java Beans, JDBC API for database access
1.0 1996 First version of Java programming language, introduced object-oriented programming and bytecode in Java, which made Java cross-platform

History

[edit]
James Gosling

The Java platform and language began as an internal project at Sun Microsystems in December 1990, providing an alternative to the C++/C programming languages. 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. Naughton informed Scott McNealy about his plan of leaving Sun and moving to NeXT; McNealy asked him to pretend he was God and send him an e-mail explaining how to fix the company. Naughton envisioned the creation of a small team that could work autonomously without the bureaucracy that was stalling other Sun projects. McNealy forwarded the message to other important people at Sun, and the Stealth Project started.[47]

The Stealth Project was soon renamed to the Green Project, with James Gosling and Mike Sheridan joining Naughton. Together with other engineers, they began work in a small office on Sand Hill Road in Menlo Park, California. They aimed to develop new technology for programming next-generation smart appliances, which Sun expected to offer major new opportunities.[48]

The team originally considered using C++, but rejected it for several reasons. Because they were developing an embedded system with limited resources, they decided that C++ needed too much memory and that its complexity led to developer errors. The language's lack of garbage collection meant that programmers had to manually manage system memory, a challenging and error-prone task. The team also worried about the C++ language's lack of portable facilities for security, distributed programming, and threading. Finally, they wanted a platform that would port easily to all types of devices.

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.[49]

By the summer of 1992, the team could demonstrate portions of the new platform, including the Green OS, the Oak language, the libraries, and the hardware. Their first demonstration, on September 3, 1992, focused on building a personal digital assistant (PDA) device named Star7[1] that had a graphical interface and a smart agent called "Duke" to assist the user. 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.[50] The Firstperson team had an interest in building highly interactive devices, and when Time Warner issued a request for proposal (RFP) for a set-top box, Firstperson changed their target and responded with a proposal for a set-top box platform. However, the cable industry felt that their platform gave too much control to the user, so Firstperson lost their bid to SGI. An additional deal with The 3DO Company for a set-top box also failed to materialize. Unable to generate interest within the television industry, the company was rolled back into Sun.

Java meets the Web

[edit]
John Gage

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. As a prototype, Naughton wrote a small browser, WebRunner (named after the movie Blade Runner), renamed HotJava[48] in 1995.

Sun renamed the Oak language to Java after a trademark search revealed that Oak Technology used the name Oak.[51] Sun priced Java licenses below cost to gain market share.[52] Although Java 1.0a became available for download in 1994, the first public release of Java, Java 1.0a2 with the HotJava browser, came on May 23, 1995, announced by Gage at the SunWorld conference. Accompanying Gage's announcement, Marc Andreessen, Executive Vice President of Netscape Communications Corporation, unexpectedly announced that Netscape browsers would include Java support. On January 9, 1996, Sun Microsystems formed the JavaSoft group to develop the technology.[53]

While the so-called Java applets for web browsers no longer are the most popular use of Java (with it e.g. more used server-side) or the most popular way to run code client-side (JavaScript took over as more popular), it still is possible to run Java (or other JVM languages such as Kotlin) in web browsers, even after JVM support has been dropped from them, using e.g. TeaVM.

GNU General Public License

[edit]

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

Version history

[edit]

The Java language has undergone several changes since the release of JDK (Java Development Kit) 1.0 on January 23, 1996, as well as numerous additions of classes and packages to the standard library. Since J2SE 1.4 the Java Community Process (JCP) has governed the evolution of the Java Language. The JCP uses Java Specification Requests (JSRs) to propose and specify additions and changes to the Java platform. The Java Language Specification (JLS) specifies the language; changes to the JLS are managed under JSR 901.[56]

Sun released JDK 1.1 on February 19, 1997. 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).

J2SE 1.2 (December 8, 1998) – Codename Playground. This and subsequent releases through J2SE 5.0 were rebranded Java 2 and the version name "J2SE" (Java 2 Platform, Standard Edition) replaced JDK to distinguish the base platform from J2EE (Java 2 Platform, Enterprise Edition) and J2ME (Java 2 Platform, Micro Edition). 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. A Java plug-in was released (since then web browser vendors have removed support for, and it's now deprecated for removal of Java codebase and will be removed by Java 26 in 2026[57]), and Sun's JVM was equipped with a JIT compiler for the first time.

J2SE 1.3 (May 8, 2000) – Codename Kestrel. Notable changes included the bundling of the HotSpot JVM (the HotSpot JVM was first released in April, 1999 for the J2SE 1.2 JVM), JavaSound, Java Naming and Directory Interface (JNDI) and Java Platform Debugger Architecture (JPDA).

J2SE 1.4 (February 6, 2002) – Codename Merlin. This became the first release of the Java platform developed under the Java Community Process as JSR 59.[58] Major changes included regular expressions modeled after Perl, exception chaining, an integrated XML parser and XSLT processor (JAXP), and Java Web Start.

J2SE 5.0 (September 30, 2004) – Codename Tiger. It was originally numbered 1.5, which is still used as the internal version number.[59] Developed under JSR 176, Tiger added several significant new language features including the for-each loop, generics, autoboxing and var-args.[60]

Java SE 6 (December 11, 2006) – Codename Mustang. It was bundled with a database manager and facilitates the use of scripting languages with the JVM (such as JavaScript using Mozilla's Rhino engine). As of this version, Sun replaced the name "J2SE" with Java SE and dropped the ".0" from the version number.[61] Other major changes include support for pluggable annotations (JSR 269), many GUI improvements, including native UI enhancements to support the look and feel of Windows Vista, and improvements to the Java Platform Debugger Architecture (JPDA) & JVM Tool Interface for better monitoring and troubleshooting.

Java SE 7 (July 28, 2011) – Codename Dolphin. This version developed under JSR 336.[62] It added many small language changes including strings in switch, try-with-resources and type inference for generic instance creation. The JVM was extended with support for dynamic languages, while the class library was extended among others with a join/fork framework,[63] an improved new file I/O library and support for new network protocols such as SCTP. Java 7 Update 76 was released in January 2015, with expiration date April 14, 2015.[64]

In June 2016, after the last public update of Java 7,[65] "remotely exploitable" security bugs in Java 6, 7, and 8 were announced.[17]

Java SE 8 (March 18, 2014) – Codename Kenai. Notable changes include language-level support for lambda expressions (closures) and default methods, the Project Nashorn JavaScript runtime, a new Date and Time API inspired by Joda Time, and the removal of PermGen. This version is not officially supported on the Windows XP platform,[66] but is known to work there. Thus, due to the end of Java 7's lifecycle it is the recommended version for XP users. Previously, only an unofficial manual installation method had been described for Windows XP SP3. It refers to JDK8, the developing platform for Java that also includes a fully functioning Java Runtime Environment.[67] Java 8 is supported on Windows Server 2008 R2 SP1, Windows Vista SP2 and Windows 7 SP1, Ubuntu 12.04 LTS and higher (and some other OSes).[68]

Java SE 9 and 10 have higher system requirements, i.e. Windows 7 or Server 2012 (and web browser minimum certified is upped to Internet Explorer 11 or other web browsers), and Oracle dropped 32-bit compatibility for all platforms, i.e. only Oracle's "64-bit Java virtual machines (JVMs) are certified".[69]

Java SE 11 LTS was released September 2018, the first LTS release since the rapid release model was adopted starting with version 9. For the first time, OpenJDK 11 represents the complete source code for the Java platform under the GNU General Public License, and while Oracle still dual-licenses it with an optional proprietary license, there are no code differences nor modules unique to the proprietary-licensed version.[70] Java 11 features include two new garbage collector implementations, Flight Recorder to debug deep issues, a new HTTP client including WebSocket support.[71]

Java SE 12 was released March 2019.[72]

Java SE 13 was released September 2019.[73]

Java SE 14 was released March 2020.[74]

Java SE 15 was released September 2020.

Java SE 16 was released March 2021.

Java SE 17 LTS was released September 2021.

Java SE 18 was released March 2022.

Java SE 19 was released September 2022.

Java SE 20 was released March 2023.

Java SE 21 LTS was released September 2023.

Java SE 22 was released March 2024.

In addition to language changes, significant changes have been made to the Java class library over the years, which has grown from a few hundred classes in JDK 1.0 to over three thousand in J2SE 5.0. Entire new APIs, such as Swing and Java 2D, have evolved, and many of the original JDK 1.0 classes and methods have been deprecated (thereof some "terminally deprecated"), e.g. related to finalization.[75]

At least one very rarely-used API (for threading) has been removed from Java 22.[76][77]

Usage

[edit]

Desktop use

[edit]
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

Current Java is supported on 64-bit Windows 10 (and Server 2016) and later, 64-bit macOS 13.x and later, and 64-bit Linux (e.g. Oracle Enterprise Linux). Others are not supported by Oracle (for building, but may be by IBM, SAP etc.), though are known to work e.g. AIX, Ubuntu, RHEL, and Alphine/musl. 32-bit Windows support is deprecated since Java 22 (and 32-bit JVM no longer builds without non-default options).

According to Oracle in 2010, the Java Runtime Environment was found on over 850 million PCs.[78] Microsoft has not bundled a Java Runtime Environment (JRE) with its operating systems since Sun Microsystems sued Microsoft for adding Windows-specific classes to the bundled Java runtime environment, and for making the new classes available through Visual J++.[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.[citation needed] Many Linux distributions include the OpenJDK runtime as the default virtual machine, negating the need to download the proprietary Oracle JRE.[79]

Some Java applications are in fairly widespread desktop use, including the NetBeans, Eclipse and JetBrains[80] integrated development environments, and file sharing clients such as LimeWire and Vuze. Java is also used in the MATLAB mathematics programming environment, both for rendering the user interface and as part of the core system. Java provides cross platform user interface for some high end collaborative applications such as Lotus Notes.

Oracle plans to first deprecate the separately installable Java browser plugin from the Java Runtime Environment in JDK 9 then remove it completely from a future release, forcing web developers to use an alternative technology.[81]

Mascot

[edit]

Duke is Java's mascot.[82]

When Sun announced that Java SE and Java ME would be released under a free software license (the GNU General Public License), they released the Duke graphics under the free BSD license at the same time.[83] A new Duke personality is created every year.[84] For example, in July 2011 "Future Tech Duke" included a bigger nose, a jetpack, and blue wings.[85]

Licensing

[edit]

The source code for Sun's implementations of Java (i.e. the de facto reference implementation) has been available for some time, but until recently,[86] the license terms severely restricted what could be done with it without signing (and generally paying for) a contract with Sun. As such these terms did not satisfy the requirements of either the Open Source Initiative or the Free Software Foundation to be considered open source or free software, and Sun Java was therefore a proprietary platform.[87]

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. These implementations also tended to be far less optimized than Sun's.[citation needed]

Free software

[edit]
Jonathan I. Schwartz

Sun announced in JavaOne 2006 that Java would become free and open-source software,[88] and on October 25, 2006, at the Oracle OpenWorld conference, Jonathan I. Schwartz said that the company was set to announce the release of the core Java Platform as free and open source software within 30 to 60 days.[89]

Sun released the Java HotSpot virtual machine and compiler as free software under the GNU General Public License on November 13, 2006, with a promise that the rest of the JDK (that includes the JRE) would be placed under the GPL by March 2007 ("except for a few components that Sun does not have the right to publish in distributable source form under the GPL").[90] According to Richard Stallman, this would mean an end to the "Java trap".[91] Mark Shuttleworth called the initial press announcement, "A real milestone for the free software community".[92]

Sun released the source code of the Class library under GPL on May 8, 2007, except some limited parts that were licensed by Sun from third parties who did not want their code to be released under a free software and open-source license.[93] Some of the encumbered parts turned out to be fairly key parts of the platform such as font rendering and 2D rasterising, but these were released as open-source later by Sun (see OpenJDK Class library).

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. In the meantime, a third-party project called IcedTea created a completely free and highly usable JDK by replacing encumbered code with either stubs or code from GNU Classpath. However OpenJDK has since become buildable without the encumbered parts (from OpenJDK 6 b10[94]) and has become the default runtime environment for most Linux distributions.[95][96][97][98]

In June 2008, it was announced that IcedTea6 (as the packaged version of OpenJDK on Fedora 9) has passed the Technology Compatibility Kit tests and can claim to be a fully compatible Java 6 implementation.[99]

Because OpenJDK is under the GPL, it is possible to redistribute a custom version of the JRE directly with software applications,[100][101] rather than requiring the enduser (or their sysadmin) to download and install the correct version of the proprietary Oracle JRE onto each of their systems themselves.

Criticism

[edit]

In most cases, Java support is unnecessary in Web browsers, and security experts recommend that it not be run in a browser unless absolutely necessary.[102] It was suggested[by whom?] that, if Java is required by a few Web sites, users should have a separate browser installation specifically for those sites.[citation needed]

Generics

[edit]

When generics were added to Java 5.0, there was already a large framework of classes (many of which were already deprecated), so generics were chosen to be implemented using erasure to allow for migration compatibility and re-use of these existing classes. This limited the features that could be provided by this addition as compared to some other languages.[103][104] The addition of type wildcards made Java unsound.[105]

Unsigned integer types

[edit]

Java lacks native unsigned integer types. Unsigned data are often generated from programs written in C and the lack of these types prevents direct data interchange between C and Java. Unsigned large numbers are also used in many numeric processing fields, including cryptography, which can make Java less convenient to use for these tasks.[106] Although it is possible to partially circumvent this problem with conversion code and using larger data types, it makes using Java cumbersome for handling the unsigned data. While a 32-bit signed integer may be used to hold a 16-bit unsigned value with relative ease, a 32-bit unsigned value would require a 64-bit signed integer. Additionally, a 64-bit unsigned value cannot be stored using any integer type in Java because no type larger than 64 bits exists in the Java language. If abstracted using functions, function calls become necessary for many operations which are native to some other languages. Alternatively, it is possible to use Java's signed integers to emulate unsigned integers of the same size, but this requires detailed knowledge of complex bitwise operations.[107]

Floating-point arithmetic

[edit]

While Java's floating-point arithmetic is largely based on IEEE 754 (Standard for Binary Floating-Point Arithmetic), certain features are not supported even when using the strictfp modifier, such as Exception Flags and Directed Roundings – capabilities mandated by IEEE Standard 754. Additionally, the extended-precision floating-point types permitted in 754 and present in many processors are not permitted in Java.[108][109]

Performance

[edit]

In the early days of Java (before the HotSpot VM was implemented in Java 1.3 in 2000) there were some criticisms of performance. Benchmarks typically reported Java as being about 50% slower than C (a language which compiles to native code).[110][111][112]

Java's performance has improved substantially since the early versions.[26] Performance of JIT compilers relative to native compilers has in some optimized tests been shown to be quite similar.[26][27][28]

Java bytecode can either be interpreted at run time by a virtual machine, or it can be compiled at load time or runtime into native code which runs directly on the computer's hardware. Interpretation is slower than native execution, and compilation at load time or runtime has an initial performance penalty for the compilation. Modern performant JVM implementations all use the compilation approach, so after the initial startup time the performance is equivalent to native code.

Security

[edit]

The Java platform provides a security architecture[113] which is designed to allow the user to run untrusted bytecode in a "sandboxed" manner to protect against malicious or poorly written software. This "sandboxing" feature is intended to protect the user by restricting access to certain platform features and APIs which could be exploited by malware, such as accessing the local filesystem, running arbitrary commands, or accessing communication networks.

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. These flaws affect only Java applications which execute arbitrary untrusted bytecode, such as web browser plug-ins that run Java applets downloaded from public websites. Applications where the user trusts, and has full control over, all code that is being executed are unaffected.

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.[114] Java 5 was later found to be flawed as well.[115]

On January 10, 2013, three computer specialists spoke out against Java, telling Reuters that it was not secure and that people should disable Java. Jaime Blasco, Labs Manager with AlienVault Labs, stated that "Java is a mess. It's not secure. You have to disable it."[116] This vulnerability affects Java 7 and it is unclear if it affects Java 6, so it is suggested that consumers disable it.[117][118] Security alerts from Oracle announce schedules of critical security-related patches to Java.[119]

On January 14, 2013, security experts said that the update still failed to protect PCs from attack.[120] This exploit hole prompted a response from the United States Department of Homeland Security encouraging users to disable or uninstall Java.[18] Apple blacklisted Java in limited order for all computers running its OS X operating system through a virus protection program.[121]

In 2014 and responding to then-recent Java security and vulnerability issues, security blogger Brian Krebs has called for users to remove at least the Java browser plugin and also the entire software. "I look forward to a world without the Java plugin (and to not having to remind readers about quarterly patch updates) but it will probably be years before various versions of this plugin are mostly removed from end-user systems worldwide."[122] "Once promising, it has outlived its usefulness in the browser, and has become a nightmare that delights cyber-criminals at the expense of computer users."[123] "I think everyone should uninstall Java from all their PCs and Macs, and then think carefully about whether they need to add it back. If you are a typical home user, you can probably do without it. If you are a business user, you may not have a choice."[124]

Adware

[edit]

The Oracle-distributed Java runtime environment has a history of bundling sponsored software to be installed by default during installation and during the updates which roll out every month or so. This includes the "Ask.com toolbar" that will redirect browser searches to ads and "McAfee Security Scan Plus".[125] These offers can be blocked through a setting in the Java Control Panel, although this is not obvious. This setting is located under the "Advanced" tab in the Java Control Panel, under the "Miscellaneous" heading, where the option is labelled as an option to suppress "sponsor offers".

Update system

[edit]

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

See also

[edit]

References

[edit]
[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
Java is a high-level, class-based, language designed for platform independence through compilation to that runs on the (JVM), enabling execution across diverse hardware and operating systems without recompilation. Originally developed by and his team at as part of the Green Project in 1991—initially named —it was publicly released in 1995 to support but quickly pivoted to web applications and general-purpose software development. Following Sun's acquisition by in 2010, Oracle has stewarded Java's evolution, including its open-sourcing under the GNU General Public License in 2006 and the establishment of a six-month release cadence since 2017 to deliver innovations more rapidly. The language emphasizes simplicity, robustness, and security, drawing syntactic influences from C and C++ while eliminating low-level features like pointers to reduce errors and enhance portability. Key design principles include automatic via garbage collection, strong typing to catch errors early, and built-in support for multithreading and dynamic class loading, making it suitable for large-scale, distributed applications. Java's "write once, run anywhere" philosophy is realized through the JVM, which interprets or just-in-time compiles , alongside extensive standard libraries in editions like Java SE (Standard Edition) for desktop and server development, (formerly Java EE) for web and enterprise systems, and Java ME (Micro Edition) for embedded devices. As of November 2025, Java remains one of the most widely used programming languages, powering billions of devices from smartphones to supercomputers, with the latest release being JDK 25 (September 2025) and regular updates like JDK 21.0.9 ensuring ongoing security and performance enhancements. Its ecosystem includes frameworks like Spring for and Android's Dalvik/ART runtime (though uses a compatible implementation), underscoring its versatility in , , mobile apps, and . The language's enduring popularity stems from its balance of productivity, , and a vast community of millions of developers worldwide.

Overview

Core Principles

Java is a high-level, object-oriented software platform designed for developing and executing applications through the Java Virtual Machine (JVM), which abstracts the underlying hardware and operating system to enable consistent behavior across diverse environments. The platform encompasses a programming language, runtime environment, and extensive libraries that support the creation of robust, scalable software. Central to Java's design is the "" (WORA) principle, which allows developers to compile into platform-independent that the JVM interprets or compiles on any supported system, eliminating the need for platform-specific recompilation. This is generated by the () from human-readable source files, forming an that the JVM executes, thereby insulating applications from variations in processor architectures or operating systems. Java's core tenets emphasize , robustness, , multithreading, and automated . Simplicity is achieved through a clean syntax and elimination of complex features like explicit pointers, making the accessible while maintaining expressiveness. Robustness stems from strong , which prevents many common programming errors, and automatic garbage collection that reclaims unused memory without developer intervention, reducing risks like memory leaks. is integrated at the and runtime levels, with features like verification and sandboxing to mitigate vulnerabilities such as unauthorized access or malicious code execution. Native support for multithreading enables concurrent execution of tasks, leveraging threads for efficient resource utilization in applications like servers and simulations. During execution, the JVM employs just-in-time (JIT) compilation to translate frequently used into native , optimizing performance by adapting to runtime patterns and reducing interpretation overhead. This dynamic compilation enhances the platform's efficiency without compromising its portability.

Latest Release

As of November 2025, the latest (LTS) release of Java SE is version 25, which reached general availability on September 16, 2025. Oracle provides premier support for Java 25 until at least September 30, 2030, with extended support available until 2033, ensuring long-term stability for enterprise applications. This LTS version builds on Java 21, the prior LTS release from September 2023, by incorporating four years of enhancements while preserving source and binary compatibility for well-behaved applications. Key enhancements in Java 25 focus on improving concurrency, language expressiveness, and performance efficiency. Notable finalized features include scoped values (JEP 506), which provide a lightweight mechanism for sharing immutable data across concurrent tasks without the overhead of thread-local variables, advancing Project Loom's goals for scalable concurrency. Other finalized features include compact source files (JEP 512) for streamlined class definitions and a API (JEP 510) for cryptographic applications. Preview features highlight improvements (JEP 507, third preview), enabling primitive types in instanceof patterns and switch expressions for more concise and type-safe code handling, and (JEP 505, fifth preview), which structures groups of related subtasks as a single unit of work to simplify error handling and cancellation in concurrent programming. Developers can download Java 25 from official sources, including the JDK, which offers commercial support and additional tools like , available at oracle.com/java/technologies/downloads. Alternatively, the open-source builds, licensed under GPL with Classpath Exception, are provided by the project at jdk.java.net/25 and various vendors like and Azul, ensuring free access without licensing restrictions. Migration from Java 21 to Java 25 is generally straightforward due to Java's strong guarantees, with no breaking changes to the Java SE Platform API or language specification for existing . However, developers should review warnings specific to Java 25, such as the deprecation of primitive wrapper constructors (e.g., new Long(longValue)) for removal in a future release, and the removal of the 32-bit x86 port, which was deprecated in Java 24. Tools like jdeprscan can help identify affected during upgrades.

Platform Architecture

Java Virtual Machine

The (JVM) is an abstract computing machine designed to execute , providing a platform-independent runtime environment that manages allocation, thread execution, and constraints. Defined in the official JVM specification, it operates as a stack-based with a precise instruction set for manipulating data and , ensuring that programs compiled for one JVM implementation run identically on any compliant JVM across different hardware architectures. The JVM handles runtime operations such as loading classes into , verifying their integrity, and executing instructions while abstracting underlying system details like operating system calls and hardware specifics. Central to the JVM's architecture are several key components that facilitate secure and efficient execution. The class loader subsystem is responsible for dynamically loading class files into the JVM at runtime, using a hierarchical model where bootstrap, extension, and application class loaders resolve dependencies and prevent class name conflicts through isolation. Once loaded, the bytecode verifier performs static analysis on the to enforce , ensuring that operations conform to the Java , prevent stack underflows or overflows, and block unauthorized memory access, thereby mitigating risks from malformed or malicious code. The execution engine processes verified bytecode through a combination of interpretation and compilation. The interpreter executes bytecode instructions sequentially in a loop, simulating the virtual machine's stack operations for immediate but slower performance during initial runs. For optimization, the just-in-time (JIT) compiler identifies frequently executed ("hot") code paths via runtime profiling and compiles them into native , enabling faster execution on subsequent invocations while maintaining portability. This hybrid approach balances startup speed with long-term performance. Memory management in the JVM is handled by the garbage collector (GC), which automatically reclaims memory occupied by unreachable objects to prevent leaks and enable efficient allocation. The heap is organized into generations to optimize collection: the young generation (divided into Eden and survivor spaces) holds newly allocated objects for frequent minor collections, while the old generation stores long-lived objects for less frequent major collections, reducing overall pause times and improving throughput based on the observed weak generational hypothesis that most objects . Oracle's HotSpot JVM serves as the reference implementation of the JVM specification, incorporating advanced features like adaptive optimization where the JIT compiler uses runtime feedback to refine compilation decisions, such as inlining methods or escaping object analysis, to achieve high performance without manual intervention. HotSpot's tiered compilation levels progressively optimize code from simple interpretation to fully optimized native execution, making it the standard for most Java deployments. Security in the JVM is enforced through a sandbox model that restricts untrusted code from remote or unverified sources from accessing system resources without explicit permissions, achieved via the SecurityManager class and policy files. Type safety is rigorously maintained by the verifier's checks during loading and linking, combined with runtime bounds checking in the interpreter and compiler, ensuring that no invalid casts, array accesses, or method invocations occur, thus providing a secure foundation for executing potentially untrusted .

Java Development Kit and Runtime Environment

The Java Development Kit (JDK) is a environment that provides the tools necessary for compiling, , and Java applications. It includes essential command-line utilities such as the , which translates Java into ; the jdb , which allows developers to inspect and control program execution; the archiver, used for creating and managing Java Archive files; and the tool, which generates documentation from comments. These components enable the full development lifecycle, from writing code to producing distributable artifacts. In modern versions (JDK 9 and later), the JDK also supports creating custom runtime images using the jlink tool, which builds minimal, optimized runtimes tailored to specific applications by including only required modules. The Java Runtime Environment (JRE) conceptually forms a of the JDK, consisting of the runtime binaries, standard class libraries, and the required to execute compiled Java programs without development tools. It provides the necessary infrastructure for running applications, including core libraries for , networking, and data structures, ensuring portability across platforms. However, separate JRE distributions were discontinued by after Java 8 (fully removed in JDK 11), with runtimes now provided by the full JDK or custom images created via jlink. Installation of the JDK typically involves downloading the appropriate distribution from official vendors and extracting or installing it to a directory, such as /usr/lib/jvm on Linux or C:\Program Files\Java on Windows. Configuration requires setting the JAVA_HOME environment variable to the installation root directory and appending the bin subdirectory to the system PATH variable, allowing commands like java and javac to be executed from any terminal or command prompt. For example, on Unix-like systems, this can be achieved with export JAVA_HOME=/path/to/jdk and export PATH=JAVAHOME/bin:JAVA_HOME/bin:PATH. Vendor implementations of the JDK and JRE vary in licensing, support, and minor features, though all must pass the Java SE for compliance. 's JDK, available under the Oracle No-Fee Terms and Conditions for recent versions like JDK 25, includes proprietary optimizations and commercial support options but aligns closely with the open-source reference. , maintained by the community under the GNU General Public License version 2 with the Exception, serves as the free, open-source foundation without commercial restrictions. , formerly AdoptOpenJDK, provides certified builds of through the Eclipse Temurin distribution, emphasizing , TCK verification, and broad vendor contributions for enterprise use.

Standard Class Libraries

The standard class libraries in Java SE form the foundational set of application programming interfaces (APIs) that enable developers to build robust applications without relying on external dependencies for core functionality. These libraries, bundled with the (JDK), provide essential services such as , data structures, operations, networking, and database access. They are designed to be platform-independent, ensuring consistent behavior across different operating systems through the (JVM). The java.lang package serves as the cornerstone of the standard libraries, containing classes and interfaces fundamental to the Java language itself. It includes the Object class, which is the root of the class hierarchy and defines methods like equals(), hashCode(), and toString() used universally for object comparison and representation. Key classes also encompass String for immutable text handling, Thread for concurrency and multithreading, wrapper classes for primitive types (e.g., Integer, Boolean), and utility classes like Math for mathematical operations and System for runtime interactions such as input/output streams and property access. These elements are automatically imported in every Java compilation unit, making them directly accessible without explicit imports. Other critical packages extend these basics to common programming needs. The java.util package offers the Collections Framework, including interfaces like List, Set, and Map with implementations such as ArrayList, HashSet, and HashMap for efficient data storage and manipulation, alongside utilities for date/time handling (e.g., Date, Calendar), internationalization (e.g., Locale, ResourceBundle), and random number generation. The java.io package facilitates input and output operations through streams and readers/writers, supporting file handling, serialization of objects via ObjectInputStream and ObjectOutputStream, and basic data persistence. Networking capabilities are provided by the java.net package, which includes classes like Socket and ServerSocket for TCP connections, URL and URLConnection for HTTP interactions, and InetAddress for IP address resolution. For database connectivity, the java.sql package implements the Java Database Connectivity (JDBC) API, enabling SQL operations through interfaces such as Connection, Statement, and ResultSet to interact with relational databases in a vendor-neutral manner. The standard libraries originated with JDK 1.0 in 1996, providing a modest set of packages focused on core language support and basic I/O. Over subsequent releases, they expanded significantly— for instance, the Collections Framework was introduced in JDK 1.2 to standardize data structures previously scattered across ad-hoc implementations. A major architectural shift occurred with Java 9 in 2017, introducing the (JPMS), which modularized the libraries into distinct modules (e.g., java.base for core classes like java.lang and java.util). This allows for better encapsulation, reduced issues, and customizable runtime images by excluding unused modules, enhancing security and performance in large-scale applications. While the standard libraries cover essential needs, they integrate seamlessly with third-party libraries through build tools like Maven and Gradle, which manage dependencies and automate the inclusion of external JARs alongside core APIs.

Programming Languages

Java Language

The Java programming language is a high-level, class-based, object-oriented programming language designed for platform independence and robustness. It emphasizes explicit declaration of variables and methods, supporting strong, static typing to enforce type safety at compile time. This typing mechanism prevents many common errors by requiring types to be specified and checked before runtime, as detailed in the Java Language Specification. Exception handling in Java uses try-catch-finally blocks to manage errors gracefully, allowing developers to separate normal program flow from error-handling logic, which promotes reliable code. At its core, Java's syntax revolves around object-oriented paradigms, including classes, interfaces, , polymorphism, and encapsulation. Classes serve as blueprints for objects, defining fields () and methods (behavior) that encapsulate state and operations within a single unit, hiding internal details through access modifiers like private and public. Interfaces declare abstract methods and constants, enabling of type without implementation, while classes can implement multiple interfaces. Inheritance allows a class to derive from a superclass, reusing and extending its members, with the extends keyword facilitating hierarchical structures. Polymorphism enables objects of different classes to be treated uniformly through a common superclass or interface, often via , where subclasses provide specific implementations. These elements collectively support modular, maintainable code by promoting reuse and abstraction. Key language features have evolved to enhance expressiveness and safety. Generics, introduced in Java SE 5, allow classes, interfaces, and methods to operate on parameterized types, enabling type-safe collections and algorithms without casting, such as List for string-only lists. Lambda expressions, added in Java SE 8, provide concise anonymous functions for functional-style programming, typically used with functional interfaces like Predicate or Runnable, reducing boilerplate in event handling and stream operations. More recent additions include , standardized in Java SE 16, which are immutable data classes that automatically generate constructors, getters, equals, hashCode, and toString methods for simple data carriers, and sealed classes, finalized in Java SE 17, which restrict which classes or interfaces can extend or implement them using permits clauses, improving and API design by controlling hierarchies. Further enhancements as of Java SE 25 include module import statements for succinctly importing all packages from a module and flexible constructor bodies that permit field initialization before invoking the superclass constructor. Java source code, written in .java files, undergoes compilation via the compiler, which translates it into platform-independent stored in .class files. This process involves , , semantic checking, and code generation, producing instructions executable by the . The resulting is then interpreted or just-in-time compiled by the JVM for execution on any supporting platform. While primarily object-oriented, Java has incorporated functional elements since Java SE 8, such as streams for declarative data processing and method references, blending imperative and functional paradigms to streamline concurrent and collection-based operations.

Other Languages on the JVM

The (JVM) supports a variety of programming languages beyond itself, enabling polyglot programming where multiple languages can interoperate seamlessly by compiling to JVM . This capability allows developers to leverage the strengths of different languages while sharing the robust ecosystem of the JVM, including its garbage collection, , and extensive tooling. Among the most popular JVM languages are Kotlin, Scala, and Groovy, each offering distinct paradigms and use cases. Kotlin, developed by JetBrains, is a statically typed language that emphasizes conciseness, null safety, and full interoperability with Java, making it particularly suitable for Android development where it serves as the preferred language. Scala combines object-oriented and functional programming features, providing scalability and expressiveness for complex systems, with strong support for concurrency through libraries like Akka. Groovy, an Apache project, is a dynamic language inspired by Python and Ruby, designed for scripting and rapid prototyping while maintaining Java compatibility for seamless integration. These languages benefit from direct access to the vast Java class libraries, allowing reuse of existing code without wrappers, and they inherit JVM optimizations such as adaptive compilation and mature security features. is achieved through , enabling calls between languages at runtime with minimal overhead, which facilitates gradual adoption in mixed-language projects. Development tools for JVM languages are well-integrated, with IDEs like providing comprehensive support for syntax highlighting, refactoring, and across Kotlin, Scala, and . Build systems such as offer native plugins for these languages, streamlining dependency management and compilation in polyglot environments. In practice, Kotlin is widely used for building due to its concise syntax and coroutines for asynchronous programming, as seen in backend services at companies like Kakao Pay. Scala excels in data processing applications, powering frameworks like for large-scale analytics and pipelines at organizations such as and . finds application in dynamic scripting for and testing within JVM ecosystems.

Editions and Application Domains

Java SE

Java Platform, Standard Edition (Java SE) serves as the foundational computing platform for developing and deploying portable, high-performance applications on desktops and servers. It encompasses the (JDK), Java Runtime Environment (JRE), and a comprehensive set of standard class libraries that enable general-purpose programming without reliance on specialized enterprise or embedded extensions. Designed for versatility and security, Java SE supports the creation of standalone applications that run consistently across diverse operating systems and hardware through the (JVM). The scope of Java SE centers on core APIs tailored for standalone applications, providing essential functionalities for user interfaces, data handling, and system interactions. For graphical user interfaces (GUIs), it includes the (AWT) for basic platform-independent components and the more advanced Swing toolkit, which offers customizable, lightweight controls and look-and-feel options to build rich desktop experiences. Networking capabilities are handled via the java.net package, supporting protocols like TCP/IP, HTTP, and UDP for client-server communications. Concurrency is addressed through the java.util.concurrent framework, which provides high-level abstractions such as executors, locks, and atomic variables to manage multithreaded operations efficiently and avoid common pitfalls like deadlocks. These APIs form the backbone for applications requiring robust, cross-platform behavior without external dependencies. Java SE has undergone significant evolution since its inception with JDK 1.0 in January 1996, which introduced the initial set of core libraries and execution model. Subsequent releases progressively enhanced language features, performance, and security, culminating in Java 9's introduction of the (JPMS) in 2017, which modularized the platform to improve scalability, encapsulation, and maintainability for large-scale applications. This modular approach was refined and stabilized in Java 17, a (LTS) release in 2021, enabling developers to create smaller, optimized runtime images via tools like jlink while reducing the platform's overall footprint. The evolution reflects ongoing adaptations to modern development needs, such as better support for cloud-native and containerized environments. Common use cases for Java SE include desktop tools like integrated development environments (IDEs) and media players, where Swing and AWT enable intuitive GUIs; scientific computing applications that leverage libraries for , simulations, and ; and server backends for tasks such as services or in non-distributed systems. For instance, tools like Apache NetBeans IDE exemplify desktop development, while frameworks like Apache Commons Math support scientific computations in fields like physics and bioinformatics. These applications benefit from Java SE's portability and performance without the overhead of enterprise-specific features. Certification and compliance for Java SE implementations are ensured through the (TCK), formerly known as the Java Compatibility Kit (JCK), a comprehensive that verifies adherence to the Java SE specification. Vendors must pass the TCK to claim compatibility, ensuring behavioral consistency across JVMs and promoting interoperability for developers. This process is managed under the (JCP) and is available to qualified parties for testing distributions derived from . Java SE briefly references extensions like those in for enterprise scenarios, but remains focused on standard, non-specialized use.

Jakarta EE

Jakarta EE is an open-source platform specification for developing portable, scalable, and secure enterprise applications, extending the Java SE foundation with APIs and semantics for distributed systems, web services, and business logic. It enables the creation of robust, multi-tier applications through standardized components that promote across compatible implementations. Managed by the Eclipse Foundation's Working Group, it emphasizes vendor-neutral governance and community-driven evolution to support modern cloud-native architectures. The platform originated as Java EE under Oracle's stewardship but transitioned to the Eclipse Foundation in 2017 when Oracle donated the specifications to foster open innovation and address trademark constraints on the "Java" branding. This led to the rebranding as Jakarta EE, with the pivotal namespace migration from javax.* to jakarta.* implemented in Jakarta EE 9, released in September 2020, to ensure legal independence from Oracle's trademarks. Jakarta EE 10, released on September 22, 2022, marked the first major feature update post-transition, incorporating support for Java SE 11 and 17, enhanced annotations for modular development, and the introduction of the lightweight Core Profile for microservices using CDI-Lite. Jakarta EE 11, released on June 26, 2025, introduced support for Java records and virtual threads from Java SE 21, along with the new Jakarta Data 1.0 specification for simplified data access across relational and NoSQL sources, enhancing productivity for cloud-native and scalable applications. Core specifications in Jakarta EE address key enterprise needs: the Servlet API handles HTTP requests and responses for web containers, enabling dynamic development; Jakarta Server Pages (JSP) extends servlets to generate dynamic HTML content through scripting elements and tag libraries; Enterprise JavaBeans (EJB) provide a component model for transaction-aware, secure in distributed environments; the Persistence API (JPA) standardizes object-relational mapping for database interactions, supporting annotations for entity management and query languages like JPQL; and Messaging (JMS) facilitates asynchronous, reliable communication via for decoupled application integration. These components collectively support the full lifecycle of web services, from request processing to data persistence and inter-system messaging. Jakarta EE applications run on certified compatible servers that implement the full platform stack. Notable examples include Eclipse GlassFish 8.0, an open-source reference implementation providing comprehensive support for all specifications; and 38.0.0.Final, a modular, lightweight server optimized for high-performance enterprise deployments on Java 17, 21, or 25. TomEE, built on Tomcat, offers a certified-plus variant for lighter-weight full-stack needs by embedding EJB, JPA, and other features into the servlet container. To enhance cloud-native development, integrates with Eclipse MicroProfile, a set of complementary specifications that add microservices-oriented features such as configuration sourcing, health monitoring, metrics collection, and OpenTracing for observability. This synergy allows developers to build resilient, containerized applications deployable on or other orchestrators, with MicroProfile 7.1 (released June 17, 2025) aligning closely with 11 for seamless adoption in hybrid enterprise environments.

Specialized Editions

Java Platform, Micro Edition (Java ME) is designed for resource-constrained devices, such as those in the (IoT), feature phones, and other embedded systems with limited memory and processing power. It provides a lightweight runtime environment that supports the development of applications for devices where full Java SE or EE implementations are impractical due to hardware limitations. Java ME employs two primary configurations: the Connected Limited Device Configuration (CLDC), optimized for very small devices with minimal resources like sensors and basic mobile phones, and the Connected Device Configuration (CDC), suited for more capable connected devices with greater memory and networking needs. These configurations are layered with profiles, such as the Mobile Information Device Profile (MIDP) for CLDC, enabling standardized APIs for user interfaces, networking, and persistence tailored to mobile and embedded contexts. Oracle continues to maintain Java ME through its SDK, supporting development for legacy mobile ecosystems and modern IoT deployments, with the latest releases emphasizing compatibility with constrained environments like wireless sensor networks. Java CE, or Java Connected Edition, targets consumer electronics devices, particularly set-top boxes and similar multimedia appliances that require robust application support in a networked home entertainment setting. It builds on CDC foundations to deliver a Java runtime optimized for devices with moderate resources, enabling interactive applications like recording and on-demand content delivery. The edition incorporates APIs for media handling and device control, facilitating the Xlet lifecycle model for managing application states in broadcast environments, which was influenced by Java TV specifications. Although development has shifted toward broader embedded solutions, Java CE remains relevant for legacy consumer devices where Java-based ensures in systems. The Java Real-Time System (Java RTS) implements the Real-Time Specification for Java (RTSJ), providing extensions to the JVM for predictable, low-latency execution in real-time applications, such as industrial control and . It introduces features like real-time threads, asynchronous event handlers, and to minimize garbage collection pauses and ensure deterministic behavior, with latencies in the low tens of microseconds for soft real-time tasks. However, discontinued active development of Java RTS following the acquisition of , with the last major release in 2010, rendering it deprecated in favor of standard Java SE enhancements for real-time needs, such as those in Project Loom for virtual threads. In contemporary usage, specialized Java editions have evolved, with mobile development largely transitioning to Android's (ART), which compiles Java and Kotlin bytecode to native code for efficient execution on smartphones and tablets, maintaining compatibility with core Java language features up to Java 8 and subsets of later versions. For embedded systems, subsets of Java SE, including Java SE Embedded, offer scalable implementations for IoT and edge devices, reducing footprint while retaining essential APIs for secure, connected applications without relying on full ME profiles.

History

Origins and Early Development

The Green Project was initiated in June 1991 at Sun Microsystems by James Gosling, Mike Sheridan, and Patrick Naughton, along with a small team of engineers, to develop a new programming language and runtime environment tailored for consumer electronic devices. The effort, nicknamed the "Green Team," aimed to address the challenges of programming resource-constrained embedded systems like set-top boxes for interactive television, amid the emerging trend of digital convergence that promised to integrate televisions, computers, telephones, and other appliances into networked ecosystems. Gosling, who led the language design, sought to create a robust, secure alternative to existing languages that could handle the complexities of these heterogeneous devices without the pitfalls of low-level programming. The language was initially named Oak, inspired by an oak tree visible from Gosling's office window in Palo Alto, California, and was heavily influenced by C++ for its syntax and familiarity to systems programmers, as well as Smalltalk for its object-oriented principles and dynamic features. By late 1992, the team had developed a prototype inspired by Gosling's earlier work on p-code interpreters, enabling platform-independent execution—a concept that later underpinned Java's "write once, run anywhere" (WORA) principle. A key demonstration occurred on September 2, 1992, with the Star7 prototype, a handheld device resembling a modern PDA that showcased Oak's capabilities through a for controlling home entertainment systems, including a metaphorical "home" dashboard for media navigation. This demo highlighted Oak's potential for secure, portable applets in embedded contexts, though the project initially struggled to find commercial traction in the market. As the gained prominence in the mid-1990s, the Green Team pivoted toward web-enabled applications, recognizing its suitability for dynamic content delivery across diverse platforms. In 1995, the language was renamed —drawn from the team's fondness for Java and chosen after brainstorming sessions to avoid the trademarked name , already held by Oak Technologies—marking a shift from embedded focus to broader . This rebranding preceded the public announcement of on May 23, 1995, at the SunWorld Expo, which introduced the language along with applets for embedding platform-independent applications in web browsers. The first stable release, the (JDK) 1.0, followed on January 23, 1996.

Key Milestones and Evolution

Applets allowed developers to embed small, platform-independent applications directly into web browsers for interactive and dynamic content delivery, leveraging Java's "write once, run anywhere" principle to enable animations, games, and other multimedia elements without requiring plugins beyond the Java Runtime Environment, significantly boosting Java's adoption in early web development. In 1997, Java advanced its server-side capabilities with the release of the Servlet 1.0 specification in June, marking the formal standardization of server-side Java components for handling web requests and responses. Developed under the Java Community Process, Servlets provided a robust framework for building dynamic web applications, integrating seamlessly with web standards like HTTP and facilitating the rise of Java as a dominant force in server-side programming. A pivotal corporate shift occurred in 2010 when completed its acquisition of on January 27, transferring stewardship of Java to Oracle and ensuring continued development under a major provider. This move consolidated Java's ecosystem, including its core technologies and open-source projects, under Oracle's influence, which prioritized enterprise integration while maintaining compatibility. The applet era concluded amid evolving web security standards, with announcing their deprecation in January 2016 and removing support in subsequent releases, shifting focus away from browser-embedded execution toward modern alternatives like frameworks. In 2017, Project Jigsaw introduced modularization to Java SE 9, enabling developers to create self-contained modules for better encapsulation, scalability, and reduced startup times in large applications. This effort also involved the removal of several deprecated features to streamline the platform's library, promoting stronger boundaries between code components and addressing long-standing issues like complexity.

Open Sourcing and Community Involvement

The open sourcing of Java marked a significant shift toward greater involvement, beginning with efforts to create free implementations of its core libraries. The GNU Classpath project, initiated in 2001 by the , served as a key precursor by developing a implementation of the Java class libraries compatible with virtual machines and compilers. This project aimed to provide essential, libre alternatives to proprietary Java components, fostering an ecosystem for open-source Java development before the official release of by . A pivotal milestone occurred in November 2006 when launched , releasing the source code for much of the (JDK) under the GNU General Public License version 2 (GPLv2) with the Classpath Exception. This licensing allowed developers to link code with proprietary applications without requiring the entire application to be open-sourced, addressing concerns in the community while enabling broad adoption. quickly became the reference implementation for Java SE, with contributions from companies like , , and Apple, democratizing development and reducing reliance on closed-source alternatives. Parallel to these efforts, the (JCP), established in , has played a central role in Java's by enabling collaborative specification development through expert groups. These groups, comprising members from industry, academia, and user organizations, propose and refine Java Specification Requests (JSRs) to evolve the platform's standards, ensuring community input shapes features and compatibility. The JCP's open participation model has grown post-open sourcing, with transparency enhancements like public expert group discussions promoting inclusivity. The transition extended to enterprise Java in 2017, when Oracle transferred stewardship of Java EE to the Eclipse Foundation, rebranding it as Jakarta EE to emphasize community-driven evolution. Under Eclipse's governance, the Jakarta EE Working Group now oversees specifications, with contributions from vendors like IBM, Red Hat, and Payara, focusing on cloud-native capabilities and reducing vendor lock-in. This move has invigorated community involvement, with over 50 member organizations participating in roadmap planning and reference implementations.

Versions and Releases

Version Numbering and Support

Java's version numbering for the Standard Edition (SE) evolved over time to reflect changes in release strategy. Prior to Java 9, released in 2017, versions followed a 1.x scheme, where the major version was denoted after the decimal, such as 1.8 for Java 8, emphasizing and incremental updates. This numbering distinguished between the developer version (1.x) and the product version (x). Starting with Java 9, Oracle simplified the scheme by dropping the "1.", using integer values for major releases, such as Java 9 and Java 10. From Java 11 onward, released in 2018, the numbering aligns more closely with the release year, facilitating easier identification of temporal progression, as seen in (LTS) versions like Java 11 (2018), Java 17 (2021), Java 21 (2023), and Java 25 (2025). Since September 2017, Java SE has adopted a six-month release cadence, delivering feature-complete versions in March and September each year, which accelerates innovation while maintaining stability. This rapid-release model replaced the previous three-year cycle between major versions. LTS releases, intended for production environments requiring long-term stability, occur every two years under the current policy, which shifted from a three-year interval in 2021; examples include in September 2023 and in September 2025, with the next planned as in 2027. Non-LTS feature releases introduce experimental or preview features that may stabilize in subsequent versions, allowing developers to test emerging capabilities without committing to full production support. Support lifecycles for Java SE releases are structured into distinct phases to balance innovation with reliability. All releases begin with a general availability phase under Premier Support, providing quarterly updates for security, bugs, and minor improvements. Non-LTS feature releases receive Premier Support for six months from their release date, after which updates cease except for critical security patches under community efforts like OpenJDK. LTS releases extend this significantly: Premier Support lasts approximately three years, ensuring comprehensive updates until the subsequent LTS is established; this is followed by a paid Extended Support phase for an additional three years, offering continued security fixes and vendor-specific enhancements. Upon conclusion of Extended Support, LTS versions enter Sustaining Support indefinitely, where Oracle provides security alerts and critical patches but no new fixes or enhancements, with community-driven updates available via OpenJDK. For instance, Java 25, as a recent LTS, is slated for Premier Support until around September 2028 under Oracle's no-fee terms for personal use. This tiered model encourages timely upgrades to LTS versions for enterprise deployments while supporting legacy systems through extended options.

Major Version Features

Java SE 5.0, released in 2004, introduced several foundational language enhancements that improved , expressiveness, and developer productivity. Generics allowed for parameterized types, enabling collections and other data structures to enforce type constraints at , reducing runtime errors and eliminating the need for explicit casting. Annotations (previously known as metadata) provided a mechanism for embedding supplementary information in code, which could be processed at or runtime, paving the way for frameworks like and testing tools. Autoboxing and automatically converted between primitive types and their corresponding wrapper classes, simplifying code for operations involving collections and arithmetic. Additionally, enums offered a robust way to define named constants with associated behavior, replacing ad-hoc constants and improving maintainability. These features collectively addressed long-standing limitations in earlier versions, making Java more concise and safer for enterprise development. Java SE 8, released in 2014, marked a significant evolution toward paradigms, introducing lambda expressions that enabled treating functions as first-class citizens, allowing concise implementation of single-method interfaces without anonymous inner classes. The Stream API built on lambdas to provide a declarative way to process collections, supporting operations like filtering, mapping, and reducing in a parallelizable manner, which facilitated more readable and efficient data processing pipelines. Default methods in interfaces allowed adding new functionality to existing interfaces without breaking binary compatibility, enabling evolution of library APIs like java.util.Collection. These innovations shifted Java toward a more functional style, with lambda expressions and streams influencing code patterns in areas like concurrency and data manipulation. The release saw widespread adoption, with surveys indicating that by 2017, 89% of developers used Java 8 for new applications, underscoring its role in sustaining Java's relevance in modern . Java SE 11, released in 2018 as the first version under the new six-month cadence, standardized key APIs and enhanced the platform's dynamism. The HTTP Client, previously incubated in JDK 9 and 10, was fully standardized as part of java.net.http, providing a modern, asynchronous API for HTTP/1.1 and requests with support for . Dynamic class-file constants, introduced via 309, allowed the JVM to resolve symbolic references to constants at runtime rather than link time, enabling more flexible and reducing class loading overhead in dynamic scenarios like optimization. These features improved and performance for networked and modular applications without introducing breaking changes. Java SE 17, released in 2021 as a version, advanced language expressiveness and performance capabilities. Sealed classes and interfaces restricted inheritance hierarchies to explicitly permitted subclasses, enhancing design-by-contract principles and enabling exhaustive in switch statements. Pattern matching for switch, introduced as a preview feature, allowed deconstructing data directly in switch labels, simplifying type checks and reducing boilerplate compared to traditional instanceof usage. The Vector API, in its fifth incubator stage, provided a platform-agnostic way to express SIMD () computations, leveraging hardware vector units for high-performance numerical processing in libraries like . These additions built on prior previews, promoting safer, more efficient code in domains requiring structured data handling and compute-intensive operations. Java 9's modularity system, introduced via Project Jigsaw, laid groundwork for these by enabling finer-grained encapsulation in the platform.

Recent Developments

In recent years, Project Loom has advanced significantly, with virtual threads finalized in Java 21 (JEP 444, September 2023), enabling scalable concurrency by allowing millions of threads to run efficiently on a small number of carrier threads, addressing limitations of traditional platform threads in high-throughput applications such as web servers. This feature, initially previewed in Java 19 and stabilized in Java 21, integrates with advancements like (JEP 505, fifth preview in Java 25, released on September 16, 2025) to simplify error handling and resource management in concurrent code. Project Valhalla continues to evolve in preview stages, focusing on value types and specialized generics to enhance performance by eliminating object overhead in data-intensive scenarios. As of October 2025, early-access builds implement JEP 401 for value classes and objects, enabling primitive-like efficiency for user-defined types without identity, such as points or complex numbers. Specialized generics, building on JEP 218, allow generic classes to work directly with primitives, reducing boxing costs and improving memory usage in collections and algorithms. These features remain experimental, with integration into mainline JDK anticipated after further refinement. GraalVM's integration with Java has deepened, particularly through native image compilation, which produces standalone executables for faster startup times and lower resource consumption in cloud and edge deployments. In GraalVM 25.0.1, released October 21, 2025, native images now support the Foreign Function & Memory API and initial optimizations for the Vector API, enabling seamless incorporation of native libraries and vectorized computations without runtime JIT overhead. This evolution supports frameworks like and , reducing cold-start latencies from seconds to milliseconds in serverless environments. Enhancements for AI and machine learning have progressed via the Vector API and Project Panama's . The Vector API, in its tenth incubator phase in Java 25 ( 508), provides a platform-agnostic way to express SIMD computations, optimizing loops for CPUs with vector extensions like , which can yield 2-4x speedups in numerical workloads; an eleventh incubation is targeted for JDK 26 ( 529, proposed October 2025). Project Panama's Foreign Function & Memory API (FFM), stabilized in Java 22 and refined through 2025, allows direct calls to native code and memory management, bypassing JNI for lower-latency integration with libraries like or , crucial for ML model inference. Java's cloud-native focus has intensified with improved support for operators and the evolution of . Tools like the Java Operator SDK, updated in 2024-2025, enable declarative management of Java applications on clusters, automating scaling and deployment for . Reactive Streams, extended through virtual threads and Project Reactor integrations, enhance non-blocking I/O in frameworks such as Helidon and Micronaut, supporting resilient, event-driven architectures that handle high-velocity data in cloud environments.

Usage and Adoption

Enterprise and Server-Side Applications

Java has established itself as a cornerstone for enterprise and server-side applications, powering backend systems, web services, and large-scale due to its robustness, portability, and extensive . In 2025, over 90% of companies rely on Java for their needs, particularly in sectors like banking for secure and fraud detection, and for managing high-volume inventory and sales operations. A survey of over 2,000 Java professionals indicates that nearly 70% of respondents report more than half of their organization's applications are built with Java or run on the (JVM), underscoring its dominance in enterprise environments. Key frameworks enhance Java's suitability for these applications. , holding approximately 40% market share among Java frameworks, simplifies the development of production-ready server-side applications through auto-configuration and embedded servers, making it a preferred choice for and RESTful APIs. Hibernate serves as the leading object-relational mapping (ORM) tool, enabling seamless persistence of Java objects to relational databases while implementing the API (JPA) standard for enterprise data management. For lightweight , Micronaut offers a modern alternative with ahead-of-time (AOT) compilation, low , and native cloud integration, facilitating scalable deployments in containerized environments. Java's scalability in server-side contexts is exemplified by features like virtual threads, introduced in Java 21, which allow millions of concurrent threads with minimal overhead by mapping them to a smaller pool of OS threads, thereby reducing memory usage by up to a thousandfold and supporting high-throughput enterprise servers without proportional hardware increases. Integration with databases occurs primarily through JPA, which provides a standardized approach to mapping and querying, as demonstrated in Spring Data JPA implementations that abstract complex SQL operations for relational stores like and . For messaging, Java applications commonly use the official client to handle real-time event streaming and distributed data pipelines, ensuring reliable, high-volume communication in enterprise systems. These capabilities align with the specifications, which define portable standards for building distributed enterprise applications.

Desktop, Mobile, and Embedded Systems

serves as the primary platform for developing modern desktop applications in Java, succeeding the older Swing toolkit by providing hardware-accelerated graphics, media support, and rich UI components for cross-platform deployment on Windows, macOS, and . Introduced as part of the Java SE ecosystem and open-sourced since JDK 11, enables developers to build responsive applications with features like CSS styling and FXML for declarative UI design. Tools such as the Eclipse IDE, itself implemented in Java, facilitate development through integrated editors, debuggers, and build tools tailored for desktop projects. In mobile development, remains a foundational language for Android applications through the Android Open Source Project (AOSP), where developers use APIs alongside Kotlin to create apps that compile to Dalvik executed by the (). , introduced as the default runtime starting with Android , performs to native code, enhancing performance while maintaining compatibility with -based codebases. This integration allows to power a vast ecosystem of mobile apps, though Kotlin has become the preferred language for new projects due to its conciseness and interoperability with . For embedded and IoT systems, Java Micro Edition (Java ME) provides a lightweight runtime optimized for resource-constrained devices, supporting subsets of the Java platform for applications in sensors, gateways, and industrial hardware. Libraries like Pi4J extend Java's reach to platforms such as the , offering an object-oriented for GPIO control, I2C, SPI, and to interface with hardware peripherals. In industrial control systems, real-time Java implementations enable flexible by integrating with standards like OPC and providing deterministic execution for tasks. Java's role in desktop environments has evolved amid challenges, including the deprecation of applets in JDK 9, which were once used for browser-embedded applications but became obsolete due to security concerns and lack of browser support. This shift has prompted developers to migrate toward web technologies like , frameworks, and progressive web apps for client-side interfaces, often replacing applet-based solutions with standalone Java applications or hybrid approaches.

Performance and Optimization

Java's performance is significantly enhanced by the Just-In-Time (JIT) compiler in the (JVM), which dynamically compiles into native at runtime based on observed execution patterns. This approach allows for optimizations tailored to the specific workload, such as method inlining, , and constant propagation, leading to execution speeds that approach or match those of statically compiled languages after a warm-up period. A key optimization enabled by the JIT compiler is , which examines the lifetime and scope of newly allocated objects to determine if they "escape" the current method or thread. If an object does not escape, the JIT can allocate it on the stack instead of the heap, avoiding garbage collection overhead, or even eliminate it through scalar replacement by inlining its fields directly into the calling code. This technique is particularly effective for short-lived objects in performance-critical loops, reducing memory allocation pressure and improving throughput. Garbage collection (GC) in is tunable to balance throughput, latency, and memory usage, with the JVM offering multiple collectors suited to different scenarios. The Garbage-First (G1) collector, the default since Java 9, divides the heap into regions and prioritizes collecting those with the most garbage, enabling predictable pause times for applications with large heaps (typically 4-32 GB). It can be tuned using flags like -XX:MaxGCPauseMillis to target sub-second pauses and -XX:InitiatingHeapOccupancyPercent to control when concurrent cycles begin, often achieving 90% throughput with pauses under 200 ms in tuned enterprise workloads. For ultra-low-latency requirements, the Z Garbage Collector (ZGC), introduced experimentally in Java 11 and production-ready in Java 15, performs concurrent marking, relocation, and compaction using colored pointers to track object locations without stopping application threads for more than 10 ms, even on multi-terabyte heaps. Tuning involves flags like -XX:ZCollectionIntervalMillis for cycle frequency and -XX:ConcGCThreads to scale concurrent threads with CPU cores, making it ideal for real-time systems where sub-millisecond latencies are critical. Benchmark suites like SPECjvm2008 and the Renaissance suite provide standardized measures of Java's runtime performance across diverse workloads, including compilers, cryptography, and scientific computing. For instance, Oracle's HotSpot on SPARC systems has recorded over 450 ops/m in balanced configurations, demonstrating efficient and GC integration for client-side applications. Note that SPECjvm2008 is a legacy benchmark from 2008. The suite, focused on modern JVM paradigms like and , highlights Java's competitiveness with natively compiled languages. In evaluations using the benchmark suite, Java via performs within 1.43x of C++ on average across workloads including and . Go performs at 1.30x of C++ on average but outperforms C++ by up to 1.02x in multithreaded scenarios like key-value stores, often with lower overhead than Java. These results underscore Java's strong scaling on multicore s, though it may consume more due to GC-managed objects. To address JVM startup latency and further optimize for peak performance, enables ahead-of-time (AOT) native compilation through its Native Image tool, which statically analyzes and compiles Java applications into standalone executables. This reduces startup time from seconds (in traditional JVM mode) to milliseconds—up to 200x faster in —by pre-initializing classes and eliminating runtime overhead, while also cutting peak memory usage by 50-87% in containerized environments. However, AOT trade-offs include slightly lower peak throughput (up to 5-20% slower than in long-running tasks) due to reduced runtime optimizations.

Licensing and Ecosystem

Licensing Models

Java's licensing models encompass both commercial and open-source options for distributions of the Java Development Kit (JDK) and Java Runtime Environment (JRE). The primary commercial offering is JDK, which operates under a dual-licensing structure: the Oracle No-Fee Terms and Conditions (NFTC) for limited free use and a commercial subscription model for broader production deployment. Under the NFTC, introduced in September 2021, Oracle JDK is free for development and personal use, as well as for limited production use in certain scenarios, such as non-commercial applications or small-scale deployments. Significant changes to JDK's took effect in January 2019, ending free public updates for versions beyond 8 and requiring a commercial subscription for production use of updates in Java 11, 17, and later (LTS) releases. This shift aimed to monetize enterprise adoption, with subscriptions providing access to patches, enhancements, and support; for instance, as of 2025, JDK 25 is available under the NFTC for all users until September 2028, after which subscription may be needed for continued updates. However, production use in commercial environments often exceeds free limits, necessitating paid based on employee count or processor metrics to avoid compliance risks. To use the "" trademark and claim compatibility with Java SE specifications, distributions must pass the (TCK), a suite of tests verifying adherence to the (JCP) standards; JDK is fully TCK-compliant, while third-party vendors must obtain a TCK license from to certify their builds. As alternatives to JDK, several vendors provide free, TCK-compliant distributions based on the project, avoiding commercial licensing fees. Azul Zulu is a no-cost, open-source build of licensed under the General Public License version 2 (GPLv2) with the Exception, supporting production use across LTS versions like Java 8, 11, 17, and 21 without restrictions. Similarly, Amazon Corretto offers a free, multiplatform distribution under the same GPLv2 with Exception, including and security updates for enterprise production environments.

OpenJDK and Free Software

OpenJDK serves as the primary of the (Java SE), developed through a community-driven process involving contributors from various organizations who collaborate on projects to advance the platform's features and maintenance. The codebase is licensed under the GNU General Public License version 2.0 (GPL-2.0) with the Classpath Exception, which permits linking OpenJDK with proprietary or non-GPL code without requiring the entire application to adopt the GPL license, thereby facilitating broader adoption in diverse software environments. This licensing structure enhances 's compatibility with principles, as the Classpath Exception aligns with the Free Software Foundation's (FSF) guidelines for implementations, allowing it to integrate seamlessly with projects like Classpath—a fully free class library that provides the foundational APIs for without proprietary dependencies. By avoiding restrictions that could propagate the GPL to linked applications, achieves a level of freedom endorsed by the FSF for creating libre environments. Official production-ready builds of are provided by through the jdk.java.net portal, offering downloadable binaries for major versions across platforms like , macOS, and Windows under the same GPL-2.0 with Classpath Exception license. Third-party builds, such as those from the IcedTea project, further support users by providing a harness to compile OpenJDK source code using exclusively free tools and dependencies, ensuring no components are involved in the build process. Historically, OpenJDK's status as fully was debated due to the proprietary nature of the (TCK), a required to verify Java SE compatibility and use the "Java" , which imposed field-of-use restrictions and non-disclosure agreements until Oracle's acquisition of in 2010. These limitations led initiatives like the Apache Harmony project to abandon efforts in 2011, citing inability to obtain an unrestricted TCK. In the 2010s, Oracle addressed these concerns by offering the TCK under the OpenJDK Community TCK License, allowing community members free access without NDAs for OpenJDK-based implementations, thereby improving its alignment with standards.

Community and Tools

The Java ecosystem is supported by a robust set of build tools that facilitate dependency management, project configuration, and automation of compilation, testing, and deployment processes. , an open-source tool, uses a declarative project object model (POM) to manage Java project lifecycles, including dependency resolution from centralized repositories like Maven Central. , another prominent open-source build tool, employs a - or Kotlin-based for more flexible and performant builds, making it particularly suitable for large-scale Java and Android projects. Integrated Development Environments (IDEs) play a central role in enhancing developer productivity within the Java community. , developed by , is widely adopted among Java developers due to its intelligent , refactoring tools, and seamless integration with build systems like Maven and . , an extensible open-source IDE maintained by the , remains popular for its plugin ecosystem and support for enterprise Java development, including tools for web services and modeling. , now Apache NetBeans, offers a free, modular IDE with strong out-of-the-box support for Java web and desktop applications, emphasizing ease of use for beginners and integration with frameworks like Spring. The Java community engages through various conferences and online forums that foster knowledge sharing and collaboration. JavaOne is a premier annual event focused on Java innovations, featuring technical sessions, keynotes, and hands-on labs, with the 2025 edition held in Redwood Shores, California. Devoxx, a series of developer conferences organized globally, emphasizes Java and related technologies through in-depth talks and workshops, including editions in , the , and in 2025. Online forums like serve as vital resources, where millions of Java-related questions are answered annually by a global community of developers. Contributions to the Java platform occur primarily through structured channels like the project and the (JCP). OpenJDK mailing lists, hosted on mail.openjdk.org, enable public discussions on development, bug fixes, and feature proposals across groups such as jdk-dev and core-libs-dev. Participation in the JCP allows individuals and organizations to join expert groups, review Java Specification Requests (JSRs), and influence platform evolution by submitting feedback via public mailing lists and ballots.

Criticisms and Limitations

Security Vulnerabilities

Java has faced numerous security vulnerabilities since its inception, primarily due to its widespread use in client-side and server-side environments, which exposed it to a broad . Early implementations, particularly in the and , suffered from flaws in the sandboxing mechanism designed to isolate untrusted code, allowing attackers to bypass restrictions and execute arbitrary code on user systems. These issues, combined with vulnerabilities in core components like the (JVM), have led to high-profile exploits affecting millions of installations. Ongoing efforts by and the community have focused on mitigations, but legacy features continue to pose risks in unpatched environments. One of the most significant historical vulnerabilities involved Java applets, small applications embedded in web pages that ran within a browser-integrated JVM. Introduced in , applets were intended to operate in a restrictive sandbox to prevent access to local resources, but numerous breaches emerged from the late onward. For instance, researcher Mark LaDue demonstrated in 1996 how malicious applets could exploit weaknesses in the manager to read files, execute system commands, and escalate privileges, highlighting flaws in verification and permission checks. Subsequent exploits in the and 2010s, such as type confusion attacks and deserialization gadgets, enabled sandbox escapes, leading to remote code execution on infected machines. These persistent issues, documented in analyses, contributed to the of applets in JDK 9 (2017) and their scheduled full removal in JDK 26 (2026), as browsers like Chrome and phased out plugin support due to the escalating risks. JVM-level vulnerabilities have also been a major concern, particularly insecure deserialization, where untrusted data streams are converted back into Java objects without adequate validation. A notable example is CVE-2015-7501, a remote code execution flaw in JBoss RMI servers stemming from unsafe deserialization of user-supplied input, allowing attackers to invoke arbitrary methods and compromise the host. This vulnerability, part of a broader class of issues affecting libraries like Apache Commons Collections, could lead to full system takeover if exploited over networks. Oracle addressed such risks in JDK 9 by introducing serialization filters, which allow developers to define custom rules (e.g., blocking specific classes) to validate incoming data before deserialization, significantly reducing the attack surface in modern applications. Flaws in Java's update mechanism further compounded risks during the . Oracle's Java Runtime Environment (JRE) auto-updater, intended to deliver patches seamlessly, bundled third-party such as the ASK Toolbar during installations and updates from around to , often pre-checked by default and installed without explicit user consent. This practice not only degraded user trust but also introduced additional vulnerabilities, as the bundled software could alter browser settings and facilitate distribution. By , Oracle replaced ASK with Yahoo Search integration but continued similar bundling, prompting criticism for prioritizing partnerships over hygiene. To mitigate these vulnerabilities, Java developers are advised to follow established best practices emphasizing defense in depth. The principle of least privilege restricts to minimal necessary permissions, enforced via policy files that limit access to files, networks, and system properties. Signed files, verified using digital certificates, ensure and origin, preventing tampering while allowing trusted applets (pre-deprecation) to request elevated permissions. The Java Manager, a core component, acts as a by checking operations against a configurable policy before execution, though it requires careful tuning to avoid overly permissive setups. Oracle's Secure Coding Guidelines recommend combining these with input validation, regular patching, and avoiding deserialization of untrusted data altogether where possible. In 2025, Oracle's Critical Patch Updates, such as the release, continued to address new JVM and library vulnerabilities like CVE-2025-21587.

Design and Language Critiques

Java's omission of unsigned types has been a longstanding choice, primarily to simplify the by avoiding the complexities associated with mixing signed and unsigned arithmetic, which can lead to subtle bugs in other languages. This absence necessitates workarounds in domains like networking and , where protocols often treat byte values as unsigned (0-255), forcing developers to use signed bytes and perform manual sign extensions or bit manipulations to handle values above 127 correctly. For instance, in cryptographic operations involving raw byte streams, such as hash computations or key derivations, signed representations can introduce unexpected negative values, requiring additional casting to long or explicit masking to emulate unsigned behavior. Introduced in Java 5, generics aimed to enhance but are hampered by type erasure, where the removes generic type information at runtime to maintain with pre-generics code, resulting in no runtime type checks for parameterized types. This limitation prevents operations like creating arrays of generics (e.g., List<Integer>[]), using instanceof with parameterized types, or instantiating type parameters directly (e.g., new T()), compelling developers to rely on reflection or class tokens as cumbersome alternatives. Furthermore, the use of wildcards (e.g., ? extends T) to handle variance introduces significant complexity, as inferring and annotating them correctly often requires manual refactoring to avoid type errors, with studies showing that wildcard-heavy codebases demand substantial effort to generalize libraries effectively. Java's strict adherence to the IEEE 754 standard for ensures consistent behavior across implementations but has drawn criticism for prioritizing reproducibility over flexibility, leading to portability challenges on non-compliant hardware or in legacy systems. For example, Java mandates exact rounding modes and that, while promoting reliability on modern hardware, can cause unexpected results or require platform-specific adjustments when porting code to environments with varying floating-point implementations, such as certain embedded systems. Compared to more concise languages like Python and Kotlin, Java's syntax is often critiqued for its , exemplified by the need for explicit getters, setters, and boilerplate in data classes, which increases code volume without adding expressiveness. The deliberate exclusion of further exacerbates this, as developers must write verbose method calls (e.g., vector.add(otherVector)) instead of intuitive operators (e.g., vector + otherVector), a choice made to prevent abuse and maintain readability but resulting in less ergonomic code for mathematical or domain-specific operations. Recent additions like in Java 14 partially mitigate by auto-generating constructors and accessors for immutable data carriers, though they do not address broader syntactic issues.

Performance and Maintenance Issues

Java has historically been criticized for slower runtime performance compared to natively compiled languages like C++, with early benchmarks showing Java execution times approximately 10% longer for equivalent code segments. Over time, advancements in the Just-In-Time (JIT) compiler have significantly improved this, enabling Java to deliver performance on par with C++ in numerical and scientific applications by dynamically compiling bytecode to native machine code. Despite these gains, Java's runtime efficiency remains constrained by higher memory consumption, stemming from JVM overheads such as the managed heap, per-thread stacks (typically 1 MB each), and space for JIT-generated code caches, often resulting in 25-30% more memory use than native equivalents for similar workloads. A key contributor to runtime pauses is Java's generational garbage collection (GC) mechanism, which divides the heap into young and old generations to optimize collection frequency but can introduce stop-the-world pauses during major collections. In large heaps (e.g., exceeding several gigabytes), these pauses become more pronounced, as GC times scale with the volume of live objects; for instance, full GC events in the Parallel collector may last seconds or longer if heap occupancy is high, disrupting latency-sensitive applications unless tuned with parameters like maximum pause goals. Collectors like G1 aim to mitigate this by targeting predictable pause times under 200 ms, but achieving sub-second latencies on heaps over 6 GB still requires careful configuration of region sizes and concurrent marking thresholds. The Java update system has also drawn criticism for its pre-2020s implementation, which relied on background processes such as jusched.exe to periodically check and notify users of updates, often leading to intrusive pop-up dialogs that interrupted workflows. In response to 2019 licensing shifts, Oracle ended free public updates for commercial Java SE 8 deployments, transitioning to a subscription model where updates are opt-in and require paid support, while third-party providers like handle builds. This change has alleviated some intrusiveness but created maintenance challenges for organizations relying on non-Oracle distributions, including version fragmentation and the need to validate compatibility across vendor-specific patches. Maintaining represents a substantial ongoing burden for Java's development, as the platform must uphold source, binary, and behavioral compatibility to ensure legacy code—often decades old—runs unchanged across new releases. This rigorous policy, while preserving ecosystem stability, constrains radical architectural overhauls, such as module system refinements or GC redesigns, by necessitating exhaustive compatibility testing and incremental evolution rather than breaking changes. Approaches like help mitigate some runtime issues through ahead-of-time native compilation, reducing startup times and memory overhead compared to traditional JIT-based execution.

References

Add your contribution
Related Hubs
Contribute something
User Avatar
No comments yet.