Recent from talks
Contribute something
Nothing was collected or created yet.
Java (software platform)
View on Wikipedia
| Java (software platform) | |
|---|---|
The Java technology logo | |
| Original authors | James Gosling, Sun Microsystems |
| Developer | Oracle Corporation |
| Initial release | January 23, 1996[1][2] |
| Stable release | 25 LTS (September 16, 2025[3]) [±] 21.0.5 LTS (October 15, 2024[4]) [±] |
| Written in | Java, C++, C, assembly language[8] |
| Operating system | Microsoft Windows 10+, Linux, macOS,[9] and for old versions: Solaris |
| Platform | x64, 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 in | English, Chinese, French, German, Italian, Japanese, Korean, Portuguese, Spanish, Swedish[10] |
| Type | Software platform |
| License | Dual-license: GNU General Public License version 2 with classpath exception,[11] and a proprietary license.[12] |
| Website | |

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]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]
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]
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]
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]
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]
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]- ^ "JavaSoft ships Java 1.0" (Press release). Archived from the original on February 5, 2008. Retrieved February 9, 2016.
- ^ Ortiz, C. Enrique; Giguère, Éric (2001). Mobile Information Device Profile for Java 2 Micro Edition: Developer's Guide (PDF). John Wiley & Sons. ISBN 978-0471034650. Retrieved May 30, 2012.
- ^ "Java Development Kit 25 Release Notes". Oracle Corporation. Retrieved June 9, 2025.
- ^ "Java™ SE Development Kit 21, 21.0.5 Release Notes". Oracle Corporation. Retrieved October 16, 2024.
- ^ "Java™ SE Development Kit 17, 17.0.13 Release Notes". Oracle Corporation. Retrieved October 16, 2024.
- ^ "Java™ SE Development Kit 11, 11.0.25 Release Notes". Oracle Corporation. Retrieved October 16, 2024.
- ^ "Java™ SE Development Kit 8, Update 431 Release Notes". Oracle Corporation. Retrieved October 16, 2024.
- ^ "HotSpot Group". Openjdk.java.net. Retrieved February 9, 2016.
- ^ a b "Oracle JDK 8 and JRE 8 Certified System Configurations Contents". Oracle.com. April 8, 2014. Retrieved February 9, 2016.
- ^ "Java SE 7 Supported Locales". Oracle.com. Retrieved February 9, 2016.
- ^ "OpenJDK: GPLv2 + Classpath Exception". Openjdk.java.net. April 1, 1989. Retrieved February 9, 2016.
- ^ "BCL For Java SE". Oracle.com. April 2, 2013. Retrieved February 9, 2016.
- ^ Naughton, Patrick. "Java Was Strongly Influenced by Objective-C". Virtual School. Archived from the original on August 13, 2012.
- ^ Alexander, Christopher. "Java SE 6 Advanced". www.oracle.com. Retrieved May 20, 2018.
- ^ "Why should I uninstall older versions of Java from my system?". www.java.com. Archived from the original on February 12, 2018. Retrieved February 6, 2018.
- ^ "Why should I uninstall older versions of Java from my system?". Oracle. Retrieved September 9, 2016.
- ^ a b "Oracle Critical Patch Update - July 2016". www.oracle.com.
- ^ a b Whittaker, Zack (January 11, 2013). "Homeland Security warns to disable Java amid zero-day flaw". ZDNet. Retrieved February 9, 2016.
- ^ "Java SE Overview". Oracle Corporation. Retrieved February 26, 2017.
- ^ "Java SE 6 Release Contents". Oracle Corporation and/or its affiliates. Retrieved January 1, 2013.
- ^ Moving to OpenJDK as the official Java SE 7 Reference Implementation
- ^ Java Platform, Standard Edition 7 Reference Implementations
- ^ "Java Platform, Standard Edition 8 Reference Implementations". Archived from the original on November 21, 2015.
- ^ "Differences between Java EE and Java SE - Your First Cup: An Introduction to the Java EE Platform". Docs.oracle.com. April 1, 2012. Retrieved July 18, 2012.
- ^ "Java EE Overview". Oracle Corporation. Retrieved February 26, 2017.
- ^ a b c Lewis, J. P.; Neumann, Ulrich. "Performance of Java versus C++". Graphics and Immersive Technology Lab, University of Southern California.
- ^ a b "The Java Faster than C++ Benchmark". Kano.net. November 14, 2003. Retrieved February 9, 2016.
- ^ a b FreeTTS – A Performance Case Study Archived 2009-03-25 at the Wayback Machine, Willie Walker, Paul Lamere, Philip Kwok
- ^ "OpenJDK FAQ". OpenJDK. Archived from the original on December 7, 2021. Retrieved October 23, 2021.
- ^ "BCL for Java SE". Archived from the original on August 14, 2022. Retrieved August 14, 2022.
- ^ "Java CPU and PSU Releases Explained". Archived from the original on November 3, 2014.
- ^ "Archived copy". Archived from the original on August 14, 2022. Retrieved August 14, 2022.
{{cite web}}: CS1 maint: archived copy as title (link) - ^ "Archived copy". Archived from the original on August 10, 2022. Retrieved August 14, 2022.
{{cite web}}: CS1 maint: archived copy as title (link) - ^ "Understanding Java 9 Modules". Archived from the original on August 14, 2022. Retrieved August 14, 2022.
- ^ "Java Modules".
- ^ "Java 9 Structural Changes in the JDK and JRE". October 30, 2017.
- ^ "IBM Developer".
- ^ "A Guide to Java 9 Modularity | Baeldung". April 18, 2018.
- ^ "Chapter 1. Introduction". docs.oracle.com.
- ^ www
.beanshell .org - ^ "Frequently Asked Questions about Garbage Collection in the Hotspot Java Virtual Machine". Sun Microsystems. February 6, 2003. Retrieved February 7, 2009.
- ^ a b Masamitsu, Jon (November 28, 2006). "Presenting the Permanent Generation". Archived from the original on August 25, 2016. Retrieved February 7, 2009.
- ^ Nutter, Charles (September 11, 2008). "A First Taste of InvokeDynamic". Retrieved February 7, 2009.
- ^ "JEP 122: Remove the Permanent Generation". Oracle Corporation. December 4, 2012. Retrieved March 23, 2014.
- ^ "What Is Java, Is It Insecure, and Should I Use It?". Lifehacker.com. January 14, 2013. Retrieved June 26, 2015.
- ^ "Is there any protection against Java exploits? | Kaspersky Lab". Kaspersky.com. September 9, 2013. Archived from the original on April 4, 2015. Retrieved June 26, 2015.
- ^ Southwick, Karen (1999). High Noon: the inside story of Scott McNealy and the rise of Sun Microsystems. New York [u.a.]: Wiley. pp. 120–122. ISBN 0471297135.
- ^ a b Byous, Jon (April 2003). "Java Technology: The Early Years". Sun Microsystems. Archived from the original on May 30, 2008. Retrieved August 2, 2009.
- ^ Southwick, Karen (1999). High Noon: the inside story of Scott McNealy and the rise of Sun Microsystems. New York [u.a.]: Wiley. p. 124. ISBN 0471297135.
- ^ Walrath, Kathy (December 21, 2001). "Foreword". Sun Microsystems. Retrieved August 2, 2009.
- ^ Murphy, Kieron (4 October 1996). "So why did they decide to call it Java?". JavaWorld. Retrieved 2020-07-15.
'The lawyers had told us that we couldn't use the name "OAK" because [it was already trademarked by] Oak Technologies,' said Frank Yellin, a senior engineer at Sun. 'So a brainstorming session was held to come up with ideas for a new name.'
- ^ Bank, David (December 1, 1995). "The Java Saga". Wired. Retrieved October 4, 2022.
'It's priced below our cost,' Schmidt says. 'This loses money in the licensing business for the foreseeable future. It's a strategic investment in market share.'
- ^ "Sun Microsystems announces formation of JavaSoft" (Press release). Sun Microsystems. 9 January 1996. Archived from the original on 2008-02-10.
- ^ "Sun Opens Java". Sun Microsystems. November 13, 2006. Archived from the original on May 13, 2008.
- ^ O'Hair, Kelly (December 2010). "OpenJDK7 and OpenJDK6 Binary Plugs Logic Removed". Oracle Corporation. Retrieved November 25, 2011.
- ^ "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 63". Jcp.org. Retrieved February 9, 2016.
- ^ "JEP 504: Remove the Applet API". openjdk.org. Retrieved October 31, 2025.
- ^ "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 59". Jcp.org. Retrieved February 9, 2016.
- ^ "Version 1.5.0 or 5.0?". Java.sun.com. Retrieved February 9, 2016.
- ^ "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 176". Jcp.org. Retrieved February 9, 2016.
- ^ "Java Naming". Java.com. Oracle. Retrieved August 25, 2011.
- ^ "The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 336". Jcp.org. Retrieved February 9, 2016.
- ^ Lea, Doug (September 13, 2004). "JSRs: Java Specification Requests: JSR 166: Concurrency Utilities". Java Community Process. Oracle Corp.
- ^ "Java™ SE Development Kit 7 Update 76 Release Notes". Oracle.com. Retrieved February 9, 2016.
- ^ "Java 7 and Java 8 Releases by Date". www.java.com.
- ^ "Windows XP and Java". Java.com. April 8, 2014. Retrieved February 9, 2016.
- ^ "java - installing JDK8 on Windows XP - advapi32.dll error". Stack Overflow.
- ^ "Oracle JDK 8 and JRE 8 Certified System Configurations". www.oracle.com.
- ^ "Oracle JDK 10 Certified System Configurations". www.oracle.com. Retrieved March 27, 2018.
Only X.org Mode supported. Wayland mode is unsupported.
- ^ "Oracle Java SE Support Roadmap". Oracle Corporation. September 25, 2018. Retrieved September 25, 2018.
- ^ "JDK 11". Oracle Corporation. September 25, 2018. Retrieved September 26, 2018.
- ^ "JDK 12". OpenJDK. Retrieved March 22, 2019.
- ^ "JDK 13". OpenJDK. Retrieved September 17, 2019.
- ^ "JDK 14". OpenJDK. Retrieved March 25, 2020.
- ^ "Deprecated List (Java SE 22)". cr.openjdk.org. Retrieved April 16, 2024.
- ^ "Remove Thread.countStackFrames". bugs.openjdk.org. Retrieved April 16, 2024.
- ^ "Java SE 22 ( JSR 397)". cr.openjdk.org. Retrieved April 16, 2024.
- ^ "What is Java technology and why do I need it?". Archived from the original on September 25, 2010. Retrieved December 15, 2011.
Java runs on more than 850 million personal computers worldwide, and on billions of devices worldwide, including mobile and TV devices.
- ^ "Java - Fedora Project Wiki". fedoraproject.org.
- ^ "IntelliJ Platform".
- ^ Topic, Dalibor (January 27, 2016). "Moving to a plugin-free web". Oracle.
- ^ "Duke, the Java Mascot". Oracle. Retrieved March 18, 2019.
- ^ "duke: Project Home Page". Sun Microsystems. Archived from the original on June 18, 2007. Retrieved March 18, 2007.
- ^ "Duke, the Java Mascot".
- ^ "Future Tech Duke (The Java Source)". Tori Wieldt. Archived from the original on August 20, 2011. Retrieved August 17, 2011.
- ^ Smith, Donald (September 11, 2018). "Oracle JDK Releases for Java 11 and Later".
- ^ Stallman, Richard (May 24, 2006). "The Curious Incident of Sun in the Night-Time". Groklaw. Archived from the original on May 5, 2010.
- ^ Schwartz, Jonathan. "?". Jonathan Schwartz's Blog. Sun Microsystems. Archived from the original on July 15, 2006.
- ^ "Oracle OpenWorld: UnBreakable Linux / 5015.2 not on the horizon | Formtek Blog". Formtek.com. October 26, 2006. Retrieved February 9, 2016.
- ^ "Oracle and Sun Microsystems | Strategic Acquisitions | Oracle". Sun.com. Retrieved February 9, 2016.
- ^ "Free but Shackled – The Java Trap – GNU Project – Free Software Foundation". Gnu.org. April 12, 2004. Retrieved February 9, 2016.
- ^ "Sun 'releases' Java to the World". BBC News. November 13, 2006. Retrieved May 6, 2010.
- ^ "Open JDK is here!". Sun Microsystems. May 8, 2007. Retrieved May 9, 2007.
- ^ Wielaard, Mark (May 30, 2007). "OpenJDK6 b10 source posted". Retrieved July 12, 2008.
- ^ "Redhat Java".
- ^ "Fedora Java".
- ^ "Debian Java".
- ^ "Ubuntu Java".
- ^ Sharples, Rich (June 19, 2008). "Java is finally Free and Open". Archived from the original on June 20, 2008.
- ^ libgdx (December 9, 2013). "Bundling a jre · libgdx/libgdx Wiki · GitHub". Github.com. Retrieved February 9, 2016.
- ^ "Question about bundling custom OpenJDK". Java-Gaming.org. Archived from the original on March 4, 2016. Retrieved February 9, 2016.
- ^ Cluley, Graham (January 15, 2013). ""Unless it is absolutely necessary to run Java in web browsers, disable it", DHS-sponsored CERT team says – Naked Security". Nakedsecurity.sophos.com. Archived from the original on May 21, 2023. Retrieved February 9, 2016.
- ^ "Generics in Java". Object Computing, Inc. Archived from the original on January 2, 2007. Retrieved December 9, 2006.
- ^ "What's Wrong With Java: Type Erasure". December 6, 2006. Archived from the original on July 22, 2012. Retrieved December 9, 2006.
- ^ "Java and Scala's Type Systems are Unsound" (PDF).
- ^ "Java libraries should provide support for unsigned integer arithmetic". Bug Database, Sun Developer Network. Oracle. Retrieved January 18, 2011.
- ^ Owens, Sean R. (November 5, 2009). "Java and unsigned int, unsigned short, unsigned byte, unsigned long, etc. (Or rather, the lack thereof)". darksleep.com. Retrieved October 9, 2010.
- ^ Kahan, W.; Darcy, Joseph D. (March 1, 1998). "How Java's Floating-Point Hurts Everyone Everywhere" (PDF). Retrieved December 9, 2006.
- ^ "Types, Values, and Variables". Sun Microsystems. Retrieved December 9, 2006.
- ^ "Which programming languages are fastest?". Computer Language Benchmarks Game. Archived from the original on August 14, 2011.
- ^ "speed ÷ C++ GNU g++ speed". Computer Language Benchmarks Game. Archived from the original on September 26, 2011.
- ^ "C++ vs Java performance; It's a tie! | Blog of Christian Felde". Blog.cfelde.com. June 27, 2010. Retrieved February 9, 2016.
- ^ "Java Security Architecture: Contents". Docs.oracle.com. October 2, 1998. Retrieved February 9, 2016.
- ^ Horowitz, Michael (August 31, 2012). "Java security flaw: yada yada yada | Computerworld". Blogs.computerworld.com. Archived from the original on July 24, 2014. Retrieved February 9, 2016.
- ^ Brook, Chris. "The first stop for security news". Threatpost. Archived from the original on March 8, 2013. Retrieved February 9, 2016.
- ^ "Why and How to Disable Java on Your Computer Now - Technology & science - Innovation". NBC News. January 12, 2013. Archived from the original on February 21, 2014. Retrieved February 9, 2016.
- ^ "US Department of Homeland Security Calls On Computer Users To Disable Java". Forbes.com. Retrieved February 9, 2016.
- ^ Brook, Chris. "The first stop for security news". Threatpost. Archived from the original on April 9, 2013. Retrieved February 9, 2016.
- ^ "Critical Patch Updates and Security Alerts". Oracle.com. Retrieved February 9, 2016.
- ^ Finkle, Jim (January 14, 2013). "Emergency patch for Java fails to fix cybercrime holes, warn experts". Independent.ie. Retrieved February 9, 2016.
- ^ Kelly, Meghan (January 14, 2013). "Oracle issues fix for Java exploit after DHS warns of its holes". VentureBeat. Retrieved February 9, 2016.
- ^ Krebs, Brian (February 16, 2016). "Good Riddance to Oracle's Java Plugin". KrebsOnSecurity.
- ^ Gonsalves, Antone (September 5, 2012). "Java Is No Longer Needed. Pull The Plug-In". ReadWrite. Wearable World.
- ^ "Java: should you remove it?". The Guardian. February 8, 2013.
- ^ Bott, Ed. "A close look at how Oracle installs deceptive software with Java updates". ZDNet.com. ZDNet. Retrieved December 14, 2014.
- ^ "windows 7 - How do I update Java from a non-admin account?". Super User.
- ^ "Update Google Chrome - Computer - Google Chrome Help". support.google.com.
- ^ "Adobe Security Bulletin". helpx.adobe.com.
External links
[edit]- "How The JVM Spec Came To Be". infoq.com. – Presentation by James Gosling about the origins of Java, from the JVM Languages Summit 2008
Java (software platform)
View on GrokipediaOverview
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.[1] The platform encompasses a programming language, runtime environment, and extensive libraries that support the creation of robust, scalable software.[8] Central to Java's design is the "Write Once, Run Anywhere" (WORA) principle, which allows developers to compile source code into platform-independent bytecode that the JVM interprets or compiles on any supported system, eliminating the need for platform-specific recompilation.[9] This bytecode is generated by the Java compiler (javac) from human-readable source files, forming an intermediate representation that the JVM executes, thereby insulating applications from variations in processor architectures or operating systems.[10] Java's core tenets emphasize simplicity, robustness, security, multithreading, and automated memory management. Simplicity is achieved through a clean syntax and elimination of complex features like explicit pointers, making the language accessible while maintaining expressiveness.[11] Robustness stems from strong type safety, which prevents many common programming errors, and automatic garbage collection that reclaims unused memory without developer intervention, reducing risks like memory leaks.[12] Security is integrated at the language and runtime levels, with features like bytecode verification and sandboxing to mitigate vulnerabilities such as unauthorized access or malicious code execution.[13] Native support for multithreading enables concurrent execution of tasks, leveraging threads for efficient resource utilization in applications like servers and simulations.[11] During execution, the JVM employs just-in-time (JIT) compilation to translate frequently used bytecode into native machine code, optimizing performance by adapting to runtime patterns and reducing interpretation overhead.[14] This dynamic compilation enhances the platform's efficiency without compromising its portability.[15]Latest Release
As of November 2025, the latest Long-Term Support (LTS) release of Java SE is version 25, which reached general availability on September 16, 2025.[16] 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.[6] 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.[17] 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 key derivation function API (JEP 510) for cryptographic applications.[16] Preview features highlight pattern matching improvements (JEP 507, third preview), enabling primitive types in instanceof patterns and switch expressions for more concise and type-safe code handling,[18] and structured concurrency (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.[19] Developers can download Java 25 from official sources, including the Oracle JDK, which offers commercial support and additional tools like Flight Recorder, available at oracle.com/java/technologies/downloads. Alternatively, the open-source OpenJDK builds, licensed under GPL with Classpath Exception, are provided by the OpenJDK project at jdk.java.net/25 and various vendors like Adoptium and Azul, ensuring free access without licensing restrictions.[16] Migration from Java 21 to Java 25 is generally straightforward due to Java's strong backward compatibility guarantees, with no breaking changes to the Java SE Platform API or language specification for existing code.[17] However, developers should review deprecation 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 Linux port, which was deprecated in Java 24.[17] Tools like jdeprscan can help identify affected code during upgrades.[17]Platform Architecture
Java Virtual Machine
The Java Virtual Machine (JVM) is an abstract computing machine designed to execute Java bytecode, providing a platform-independent runtime environment that manages memory allocation, thread execution, and security constraints. Defined in the official JVM specification, it operates as a stack-based virtual machine with a precise instruction set for manipulating data and control flow, 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 memory, 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 delegation model where bootstrap, extension, and application class loaders resolve dependencies and prevent class name conflicts through namespace isolation. Once loaded, the bytecode verifier performs static analysis on the bytecode to enforce type safety, ensuring that operations conform to the Java type system, 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 machine code, enabling faster execution on subsequent invocations while maintaining portability. This hybrid approach balances startup speed with long-term performance.[15] 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 die young.[20][21] 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.[14][22] 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 bytecode 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 bytecode.[23][24]Java Development Kit and Runtime Environment
The Java Development Kit (JDK) is a software development environment that provides the tools necessary for compiling, debugging, and packaging Java applications. It includes essential command-line utilities such as the javac compiler, which translates Java source code into bytecode; the jdb debugger, which allows developers to inspect and control program execution; the jar archiver, used for creating and managing Java Archive files; and the javadoc tool, which generates API documentation from source code 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.[25][26] The Java Runtime Environment (JRE) conceptually forms a subset of the JDK, consisting of the runtime binaries, standard class libraries, and the Java Virtual Machine required to execute compiled Java programs without development tools. It provides the necessary infrastructure for running applications, including core libraries for input/output, networking, and data structures, ensuring portability across platforms. However, separate JRE distributions were discontinued by Oracle after Java 8 (fully removed in JDK 11), with runtimes now provided by the full JDK or custom images created via jlink.[27][28] 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=PATH. Vendor implementations of the JDK and JRE vary in licensing, support, and minor features, though all must pass the Java SE Technology Compatibility Kit for compliance. Oracle'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. OpenJDK, maintained by the OpenJDK community under the GNU General Public License version 2 with the Classpath Exception, serves as the free, open-source foundation without commercial restrictions. Adoptium, formerly AdoptOpenJDK, provides certified builds of OpenJDK through the Eclipse Temurin distribution, emphasizing long-term support, TCK verification, and broad vendor contributions for enterprise use.[29]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 Java Development Kit (JDK), provide essential services such as object manipulation, data structures, input/output operations, networking, and database access. They are designed to be platform-independent, ensuring consistent behavior across different operating systems through the Java Virtual Machine (JVM). Thejava.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.[30]
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.[31][32][33][34]
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 Java Platform Module System (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 classpath issues, and customizable runtime images by excluding unused modules, enhancing security and performance in large-scale applications.[35]
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.[36]
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, inheritance, polymorphism, and encapsulation. Classes serve as blueprints for objects, defining fields (data) 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 multiple inheritance 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 method overriding, where subclasses provide specific implementations. These elements collectively support modular, maintainable code by promoting reuse and abstraction.[37] 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 ListOther Languages on the JVM
The Java Virtual Machine (JVM) supports a variety of programming languages beyond Java itself, enabling polyglot programming where multiple languages can interoperate seamlessly by compiling to JVM bytecode. This capability allows developers to leverage the strengths of different languages while sharing the robust ecosystem of the JVM, including its garbage collection, just-in-time compilation, and extensive tooling.[43][44] 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.[45][46] Scala combines object-oriented and functional programming features, providing scalability and expressiveness for complex systems, with strong support for concurrency through libraries like Akka.[47][48] 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.[49][50] 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.[43] Interoperability is achieved through bytecode, enabling calls between languages at runtime with minimal overhead, which facilitates gradual adoption in mixed-language projects.[51][44] Development tools for JVM languages are well-integrated, with IDEs like IntelliJ IDEA providing comprehensive support for syntax highlighting, refactoring, and debugging across Kotlin, Scala, and Groovy.[52] Build systems such as Gradle offer native plugins for these languages, streamlining dependency management and compilation in polyglot environments.[53][54] In practice, Kotlin is widely used for building microservices due to its concise syntax and coroutines for asynchronous programming, as seen in backend services at companies like Kakao Pay.[55][56] Scala excels in data processing applications, powering frameworks like Apache Spark for large-scale analytics and machine learning pipelines at organizations such as Netflix and Airbnb.[57][58] Groovy finds application in dynamic scripting for automation and testing within JVM ecosystems.[59]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 Java Development Kit (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 Java Virtual Machine (JVM).[60] 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 Abstract Window Toolkit (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.[61] 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 bytecode execution model. Subsequent releases progressively enhanced language features, performance, and security, culminating in Java 9's introduction of the Java Platform Module System (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 long-term support (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.[62] 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 numerical analysis, simulations, and data processing; and server backends for tasks such as API services or batch processing 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.[63][64] Certification and compliance for Java SE implementations are ensured through the Technology Compatibility Kit (TCK), formerly known as the Java Compatibility Kit (JCK), a comprehensive test suite 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 Java Community Process (JCP) and is available to qualified parties for testing distributions derived from OpenJDK. Java SE briefly references extensions like those in Jakarta EE for enterprise scenarios, but remains focused on standard, non-specialized use.[65]Jakarta EE
Jakarta EE is an open-source platform specification for developing portable, scalable, and secure enterprise Java 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 interoperability across compatible implementations. Managed by the Eclipse Foundation's Jakarta EE Working Group, it emphasizes vendor-neutral governance and community-driven evolution to support modern cloud-native architectures.[66][67] 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 fromjavax.* 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.[68][69]
Core specifications in Jakarta EE address key enterprise needs: the Servlet API handles HTTP requests and responses for web containers, enabling dynamic web application 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 business logic 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 message-oriented middleware 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 Red Hat WildFly 38.0.0.Final, a modular, lightweight server optimized for high-performance enterprise deployments on Java 17, 21, or 25. Apache 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.[70]
To enhance cloud-native development, Jakarta EE 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 Kubernetes or other orchestrators, with MicroProfile 7.1 (released June 17, 2025) aligning closely with Jakarta EE 11 for seamless adoption in hybrid enterprise environments.[71]
Specialized Editions
Java Platform, Micro Edition (Java ME) is designed for resource-constrained devices, such as those in the Internet of Things (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.[72] 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.[73] 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.[72] 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.[74] 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 digital video recording and on-demand content delivery.[75] 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.[76] Although development has shifted toward broader embedded solutions, Java CE remains relevant for legacy consumer devices where Java-based middleware ensures interoperability in interactive television systems.[77] 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 telecommunications. It introduces features like real-time threads, asynchronous event handlers, and scoped memory to minimize garbage collection pauses and ensure deterministic behavior, with latencies in the low tens of microseconds for soft real-time tasks.[78] However, Oracle discontinued active development of Java RTS following the acquisition of Sun Microsystems, 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.[79][80] In contemporary usage, specialized Java editions have evolved, with mobile development largely transitioning to Android's Android Runtime (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.[81] 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.[82]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.[83] 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.[83] 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.[84] 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.[83] By late 1992, the team had developed a prototype virtual machine inspired by Gosling's earlier work on UCSD Pascal p-code interpreters, enabling platform-independent execution—a concept that later underpinned Java's "write once, run anywhere" (WORA) principle.[83] 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 graphical user interface for controlling home entertainment systems, including a metaphorical "home" dashboard for media navigation.[83] This demo highlighted Oak's potential for secure, portable applets in embedded contexts, though the project initially struggled to find commercial traction in the set-top box market. As the World Wide Web gained prominence in the mid-1990s, the Green Team pivoted Oak toward web-enabled applications, recognizing its suitability for dynamic content delivery across diverse platforms.[85] In 1995, the language was renamed Java—drawn from the team's fondness for Java coffee and chosen after brainstorming sessions to avoid the trademarked name Oak, already held by Oak Technologies—marking a shift from embedded focus to broader software development.[86] This rebranding preceded the public announcement of Java 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 Java Development Kit (JDK) 1.0, followed on January 23, 1996.[87]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.[88] 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.[89] A pivotal corporate shift occurred in 2010 when Oracle Corporation completed its acquisition of Sun Microsystems on January 27, transferring stewardship of Java to Oracle and ensuring continued development under a major enterprise software provider.[90] 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.[91] The applet era concluded amid evolving web security standards, with Oracle announcing their deprecation in January 2016 and removing support in subsequent releases, shifting focus away from browser-embedded execution toward modern alternatives like JavaScript frameworks.[92] 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.[93] 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 classpath complexity.[93]Open Sourcing and Community Involvement
The open sourcing of Java marked a significant shift toward greater community involvement, beginning with efforts to create free implementations of its core libraries. The GNU Classpath project, initiated in 2001 by the Free Software Foundation, served as a key precursor by developing a free software implementation of the Java class libraries compatible with virtual machines and compilers.[94] 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 source code by Sun Microsystems.[95] A pivotal milestone occurred in November 2006 when Sun Microsystems launched OpenJDK, releasing the source code for much of the Java Development Kit (JDK) under the GNU General Public License version 2 (GPLv2) with the Classpath Exception.[96] This licensing allowed developers to link OpenJDK code with proprietary applications without requiring the entire application to be open-sourced, addressing concerns in the free software community while enabling broad adoption.[97] OpenJDK quickly became the reference implementation for Java SE, with contributions from companies like Red Hat, IBM, and Apple, democratizing development and reducing reliance on closed-source alternatives.[96] Parallel to these efforts, the Java Community Process (JCP), established in 1998, has played a central role in Java's governance 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.[98] 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.[99] 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.[100] This move has invigorated community involvement, with over 50 member organizations participating in roadmap planning and reference implementations.[101]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 backward compatibility 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 Long-Term Support (LTS) versions like Java 11 (2018), Java 17 (2021), Java 21 (2023), and Java 25 (2025).[102] 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 Java 21 in September 2023 and Java 25 in September 2025, with the next planned as Java 29 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.[6][103] 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.[6][104][105]Major Version Features
Java SE 5.0, released in 2004, introduced several foundational language enhancements that improved type safety, expressiveness, and developer productivity. Generics allowed for parameterized types, enabling collections and other data structures to enforce type constraints at compile time, 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 compile time or runtime, paving the way for frameworks like dependency injection and testing tools. Autoboxing and unboxing 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 integer constants and improving maintainability. These features collectively addressed long-standing limitations in earlier versions, making Java more concise and safer for enterprise development.[106] Java SE 8, released in 2014, marked a significant evolution toward functional programming 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 software development.[107][108][109][110] Java SE 11, released in 2018 as the first long-term support 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 HTTP/2 requests with support for reactive streams. Dynamic class-file constants, introduced via JEP 309, allowed the JVM to resolve symbolic references to constants at runtime rather than link time, enabling more flexible ahead-of-time compilation and reducing class loading overhead in dynamic scenarios like JIT optimization. These features improved interoperability and performance for networked and modular applications without introducing breaking changes.[111] Java SE 17, released in 2021 as a long-term support 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 pattern matching 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 (Single Instruction, Multiple Data) computations, leveraging hardware vector units for high-performance numerical processing in libraries like machine learning. 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.[112][113][114][115]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 structured concurrency (JEP 505, fifth preview in Java 25, released on September 16, 2025) to simplify error handling and resource management in concurrent code.[16][116][19][117] 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.[118][119] 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 Spring Boot and Quarkus, reducing cold-start latencies from seconds to milliseconds in serverless environments.[120][121] Enhancements for AI and machine learning have progressed via the Vector API and Project Panama's foreign function interface. The Vector API, in its tenth incubator phase in Java 25 (JEP 508), provides a platform-agnostic way to express SIMD computations, optimizing loops for CPUs with vector extensions like AVX-512, which can yield 2-4x speedups in numerical workloads; an eleventh incubation is targeted for JDK 26 (JEP 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 TensorFlow or CUDA, crucial for ML model inference.[122][123][124][125] Java's cloud-native focus has intensified with improved support for Kubernetes operators and the evolution of reactive streams. Tools like the Kubernetes Java Operator SDK, updated in 2024-2025, enable declarative management of Java applications on Kubernetes clusters, automating scaling and deployment for microservices. 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.[126][127]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 data processing due to its robustness, portability, and extensive ecosystem. In 2025, over 90% of Fortune 500 companies rely on Java for their software development needs, particularly in sectors like banking for secure transaction processing and fraud detection, and e-commerce for managing high-volume inventory and sales operations.[128] 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 Java Virtual Machine (JVM), underscoring its dominance in enterprise environments.[129] Key frameworks enhance Java's suitability for these applications. Spring Boot, 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 microservices and RESTful APIs.[130] Hibernate serves as the leading object-relational mapping (ORM) tool, enabling seamless persistence of Java objects to relational databases while implementing the Jakarta Persistence API (JPA) standard for enterprise data management.[131] For lightweight microservices, Micronaut offers a modern alternative with ahead-of-time (AOT) compilation, low memory footprint, and native cloud integration, facilitating scalable deployments in containerized environments.[132] 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.[133] Integration with databases occurs primarily through JPA, which provides a standardized approach to entity mapping and querying, as demonstrated in Spring Data JPA implementations that abstract complex SQL operations for relational stores like MySQL and PostgreSQL.[134] For messaging, Java applications commonly use the official Apache Kafka client to handle real-time event streaming and distributed data pipelines, ensuring reliable, high-volume communication in enterprise systems.[135] These capabilities align with the Jakarta EE specifications, which define portable standards for building distributed enterprise applications.[136]Desktop, Mobile, and Embedded Systems
JavaFX 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 Linux.[137] Introduced as part of the Java SE ecosystem and open-sourced since JDK 11, JavaFX enables developers to build responsive applications with features like CSS styling and FXML for declarative UI design.[138] Tools such as the Eclipse IDE, itself implemented in Java, facilitate JavaFX development through integrated editors, debuggers, and build tools tailored for desktop projects.[139] In mobile development, Java remains a foundational language for Android applications through the Android Open Source Project (AOSP), where developers use Java APIs alongside Kotlin to create apps that compile to Dalvik bytecode executed by the Android Runtime (ART).[140] ART, introduced as the default runtime starting with Android 5.0, performs ahead-of-time compilation to native code, enhancing performance while maintaining compatibility with Java-based codebases.[140] This integration allows Java 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 Java.[140] 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.[141] Libraries like Pi4J extend Java's reach to platforms such as the Raspberry Pi, offering an object-oriented API for GPIO control, I2C, SPI, and serial communication to interface with hardware peripherals.[142] In industrial control systems, real-time Java implementations enable flexible manufacturing by integrating with standards like OPC and providing deterministic execution for automation tasks.[143] 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.[144] This shift has prompted developers to migrate toward web technologies like HTML5, JavaScript frameworks, and progressive web apps for client-side interfaces, often replacing applet-based solutions with standalone Java applications or hybrid approaches.[145]Performance and Optimization
Java's performance is significantly enhanced by the Just-In-Time (JIT) compiler in the Java Virtual Machine (JVM), which dynamically compiles bytecode into native machine code at runtime based on observed execution patterns. This approach allows for optimizations tailored to the specific workload, such as method inlining, loop unrolling, and constant propagation, leading to execution speeds that approach or match those of statically compiled languages after a warm-up period.[146][147] A key optimization enabled by the JIT compiler is escape analysis, 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.[148] Garbage collection (GC) in Java 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.[149][150] 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.[151][152] 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 JIT and GC integration for client-side applications. Note that SPECjvm2008 is a legacy benchmark from 2008.[153][154] The Renaissance suite, focused on modern JVM paradigms like big data and machine learning, highlights Java's competitiveness with natively compiled languages. In evaluations using the Renaissance benchmark suite, Java via OpenJDK performs within 1.43x of C++ on average across workloads including big data and machine learning. 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 memory overhead than Java. These results underscore Java's strong scaling on multicore systems, though it may consume more memory due to GC-managed objects.[155][156] To address JVM startup latency and further optimize for peak performance, GraalVM 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 microservices—by pre-initializing classes and eliminating runtime JIT 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 JIT in long-running tasks) due to reduced runtime optimizations.[157][158][159]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 Oracle 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.[160][161] Significant changes to Oracle JDK's binary code license took effect in January 2019, ending free public updates for versions beyond Java 8 and requiring a commercial subscription for production use of updates in Java 11, 17, and later long-term support (LTS) releases. This shift aimed to monetize enterprise adoption, with subscriptions providing access to security patches, performance enhancements, and support; for instance, as of 2025, Oracle 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 licenses based on employee count or processor metrics to avoid compliance risks.[160][6] To use the "Java" trademark and claim compatibility with Java SE specifications, distributions must pass the Technology Compatibility Kit (TCK), a suite of tests verifying adherence to the Java Community Process (JCP) standards; Oracle JDK is fully TCK-compliant, while third-party vendors must obtain a TCK license from Oracle to certify their builds.[160] As alternatives to Oracle JDK, several vendors provide free, TCK-compliant distributions based on the OpenJDK project, avoiding commercial licensing fees. Azul Zulu is a no-cost, open-source build of OpenJDK licensed under the GNU General Public License version 2 (GPLv2) with the Classpath Exception, supporting production use across LTS versions like Java 8, 11, 17, and 21 without restrictions. Similarly, Amazon Corretto offers a free, multiplatform OpenJDK distribution under the same GPLv2 with Classpath Exception, including long-term support and security updates for enterprise production environments.[162][163][164][165]OpenJDK and Free Software
OpenJDK serves as the primary free and open-source reference implementation of the Java Platform, Standard Edition (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.[96] 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.[97][166] This licensing structure enhances OpenJDK's compatibility with free software principles, as the Classpath Exception aligns with the Free Software Foundation's (FSF) guidelines for Java implementations, allowing it to integrate seamlessly with projects like GNU Classpath—a fully free class library that provides the foundational APIs for Java without proprietary dependencies.[95] By avoiding restrictions that could propagate the GPL to linked applications, OpenJDK achieves a level of freedom endorsed by the FSF for creating libre Java environments.[167] Official production-ready builds of OpenJDK are provided by Oracle through the jdk.java.net portal, offering downloadable binaries for major versions across platforms like Linux, macOS, and Windows under the same GPL-2.0 with Classpath Exception license.[168] Third-party builds, such as those from the IcedTea project, further support free software users by providing a harness to compile OpenJDK source code using exclusively free tools and dependencies, ensuring no proprietary components are involved in the build process.[169][170] Historically, OpenJDK's status as fully free software was debated due to the proprietary nature of the Technology Compatibility Kit (TCK), a test suite required to verify Java SE compatibility and use the "Java" trademark, which imposed field-of-use restrictions and non-disclosure agreements until Oracle's acquisition of Sun Microsystems in 2010.[171] These limitations led initiatives like the Apache Harmony project to abandon efforts in 2011, citing inability to obtain an unrestricted TCK.[171] 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 free software standards.[172]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. Apache Maven, an open-source build automation tool, uses a declarative project object model (POM) to manage Java project lifecycles, including dependency resolution from centralized repositories like Maven Central.[173] Gradle, another prominent open-source build tool, employs a Groovy- or Kotlin-based domain-specific language for more flexible and performant builds, making it particularly suitable for large-scale Java and Android projects.[174] Integrated Development Environments (IDEs) play a central role in enhancing developer productivity within the Java community. IntelliJ IDEA, developed by JetBrains, is widely adopted among Java developers due to its intelligent code completion, refactoring tools, and seamless integration with build systems like Maven and Gradle.[175] Eclipse, an extensible open-source IDE maintained by the Eclipse Foundation, remains popular for its plugin ecosystem and support for enterprise Java development, including tools for web services and modeling.[176] NetBeans, 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.[177] 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.[178] Devoxx, a series of developer conferences organized globally, emphasizes Java and related technologies through in-depth talks and workshops, including editions in Europe, the UK, and Morocco in 2025.[179] Online forums like Stack Overflow 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 OpenJDK project and the Java Community Process (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.[180] 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.[181]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 attack surface. Early implementations, particularly in the 1990s and 2000s, 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 Java Virtual Machine (JVM), have led to high-profile exploits affecting millions of installations. Ongoing efforts by Oracle and the OpenJDK community have focused on mitigations, but legacy features continue to pose risks in unpatched environments.[182] 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 1995, applets were intended to operate in a restrictive sandbox to prevent access to local resources, but numerous breaches emerged from the late 1990s onward. For instance, researcher Mark LaDue demonstrated in 1996 how malicious applets could exploit weaknesses in the security manager to read files, execute system commands, and escalate privileges, highlighting flaws in bytecode verification and permission checks. Subsequent exploits in the 2000s 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 security analyses, contributed to the deprecation of applets in JDK 9 (2017) and their scheduled full removal in JDK 26 (2026), as browsers like Chrome and Firefox phased out plugin support due to the escalating risks.[183][184][185][186][144] 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.[187][188] Flaws in Java's update mechanism further compounded security risks during the 2010s. Oracle's Java Runtime Environment (JRE) auto-updater, intended to deliver patches seamlessly, bundled third-party adware such as the ASK Toolbar during installations and updates from around 2010 to 2015, 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 malware distribution. By 2015, Oracle replaced ASK with Yahoo Search integration but continued similar bundling, prompting criticism for prioritizing partnerships over security hygiene.[189][190][191] To mitigate these vulnerabilities, Java developers are advised to follow established best practices emphasizing defense in depth. The principle of least privilege restricts code to minimal necessary permissions, enforced via policy files that limit access to files, networks, and system properties. Signed JAR files, verified using digital certificates, ensure code integrity and origin, preventing tampering while allowing trusted applets (pre-deprecation) to request elevated permissions. The Java Security Manager, a core component, acts as a gatekeeper 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 October release, continued to address new JVM and library vulnerabilities like CVE-2025-21587.[192][193][194][195]Design and Language Critiques
Java's omission of unsigned integer types has been a longstanding design choice, primarily to simplify the language by avoiding the complexities associated with mixing signed and unsigned arithmetic, which can lead to subtle bugs in other languages.[196] This absence necessitates workarounds in domains like networking and cryptography, 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.[197] 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.[198] Introduced in Java 5, generics aimed to enhance type safety but are hampered by type erasure, where the compiler removes generic type information at runtime to maintain backward compatibility with pre-generics code, resulting in no runtime type checks for parameterized types.[199] 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.[200] 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.[201]
Java's strict adherence to the IEEE 754 standard for floating-point arithmetic 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.[202] For example, Java mandates exact rounding modes and exception handling that, while promoting reliability on modern IEEE 754 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.[203]
Compared to more concise languages like Python and Kotlin, Java's syntax is often critiqued for its verbosity, exemplified by the need for explicit getters, setters, and boilerplate in data classes, which increases code volume without adding expressiveness.[204] The deliberate exclusion of operator overloading 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.[205] Recent additions like records in Java 14 partially mitigate verbosity by auto-generating constructors and accessors for immutable data carriers, though they do not address broader syntactic issues.[206]
