Java in plain English
Java is a programming language that Sun Microsystems released in the mid-1990s. Today, Oracle leads its development together with the open source community in the OpenJDK project. Typical use cases include business applications, web portals and back-end interfaces, systems at banks and insurance companies, middleware, and the management interfaces of appliances.
What makes Java special is that programs are not compiled directly for a specific processor but into an intermediate code called bytecode. The Java Virtual Machine (JVM), which is available for Windows, Linux, macOS, and many other systems, executes this bytecode. That is where the promise “Write once, run anywhere” comes from.
Think of the JVM as a simultaneous interpreter: the program speaks one uniform language, and the interpreter translates it into the language of each computer. If the interpreter makes a mistake, every conversation is affected – no matter how good the speech itself was.
How Java works
To run Java programs, you need a runtime environment: a JVM together with the class libraries. For development, the Java Development Kit (JDK) adds a compiler and tools. Almost all runtimes are based on OpenJDK. Oracle and other vendors build their own distributions from it, which differ mainly in licensing, support, and how long they receive updates.
The widely used HotSpot JVM compiles frequently used parts of a program into machine code at runtime (just-in-time compilation). For particularly common tasks such as copying, encrypting, or encoding data, it uses specially optimized routines that rely on specific instructions of the processor in use. This makes Java fast. It also means, however, that a flaw in such a routine may only occur on certain processors.
New Java versions are released every six months. Selected versions, such as Java 17, 21, and 25, are designated long-term support (LTS) versions and receive security updates for years. The command java -version shows the version of the Java installation found first in the search path; check bundled runtimes individually.
A practical example
A fictional scenario: a logistics company runs a Java-based customer portal for shipment tracking, a purchased warehouse management system, and several network devices with a Java-based management interface. IT updates Java on its own servers regularly. Nobody is aware that the warehouse system and the devices use their own bundled Java runtimes.
When a critical vulnerability in Java becomes known, an inventory reveals seven different Java versions across the company – two of them without an update because the warehouse system vendor has not released a fix yet. The company isolates the affected systems, installs the available updates, restarts every Java process, and from now on includes its Java runtimes in its software bill of materials (SBOM).
Why does this matter for businesses?
In Java environments, vulnerabilities arise on three levels. First, in application code, for example through insecure deserialization of objects, injection flaws, or missing authorization checks. Second, in bundled libraries: at the end of 2021, the Log4Shell vulnerability in the Log4j logging library showed how a single component can make numerous applications worldwide vulnerable. Third, in the Java runtime itself, as with the Java4Shell vulnerability disclosed in 2026. In the worst case, such flaws lead to remote code execution, meaning a takeover of the server.
On top of that, Java is often hidden inside products. Many vendors ship their software with their own Java runtime, which an operating system update does not cover. If you don’t know everywhere Java runs, you cannot apply updates completely. An SBOM provides the necessary overview.
How to protect your organization
- Use supported versions: Only run Java versions for which your vendor still provides security updates, and plan migrations well in advance.
- Apply updates quickly: Java updates belong in your patch management. Restart every Java process afterward, and rebuild your container images.
- Know your inventory: Record every Java runtime – on servers, in containers, in business applications, and in appliances that ship their own copy of Java.
- Maintain dependencies: Regularly check bundled libraries for known vulnerabilities with a CVE record, and update them promptly.
- Reduce the attack surface: Only expose the services you need, block debug and management interfaces from the outside, and run Java services with restricted privileges. Learn more under system hardening.
- Test regularly: Penetration tests and code reviews find vulnerabilities in Java applications before attackers do.
How Rootsektor can help
In our web application penetration tests, we examine Java-based portals and interfaces for typical vulnerabilities – from injection flaws and insecure deserialization to errors in access control. With a code review, we analyze the source code and bundled libraries directly. A vulnerability assessment shows where outdated Java versions are running in your infrastructure.