JDK, JRE, and Java releases
Map the installed tools and runtime, read real version metadata, and distinguish feature releases, updates, and vendor support.
This is a fresh Java VM session. All starting files are supplied here; no notebook or earlier lesson is required. Work through the experiments, predict each result, and inspect what actually changed. Resetting or leaving discards guest files.
What is installed here?
A Java installation combines several ideas. The JVM executes bytecode. The JRE is the runtime concept: the JVM and libraries needed to run Java programs. The JDK includes runtime components and development tools such as javac, jshell, jar, and javadoc. You do not need a second installation simply because both java and javac are present.
Modern packaging varies. A JDK need not contain a nested jre/ directory, and a vendor need not distribute a separate JRE download. Use the actual files and tool paths as evidence rather than judging an installation by an old directory screenshot.
flowchart TD
JDK[JDK: runtime plus development tools] --> Tools[javac, jshell, jar, javadoc]
JDK --> Runtime[Runtime libraries and JVM]
Runtime --> Run[Run compiled applications]
Tools --> Build[Compile and inspect applications]
JAVA_HOME and PATH have different jobs
JAVA_HOME points to the installation root, here /opt/java. PATH tells the shell where to search for commands. command -v java identifies the command found by the shell; readlink -f resolves any symbolic links. Inspect both java and javac. Do not assume a shell command resolves inside JAVA_HOME just because the variable is set.
A runtime-only environment can launch compatible classes but cannot compile Java source without a compiler. An arbitrary folder called java is not evidence of a JDK. The executable tools and the distribution's release metadata give stronger evidence.
Read the installation map
The lab supplies the Zulu 27 distribution. Inspect these directories:
| Directory or file | What to look for | | --- | --- | | bin | Executable launchers and tools | | conf | Configuration files | | lib | Runtime implementation and module image | | jmods | Modules used by tools such as jlink | | include | Native interface headers | | legal | License and notice files | | release | Vendor, feature version, platform, module metadata |
Do not edit the installed JDK. Your notes and compilation outputs belong under ~/java-lab. The final installation map records a path and purpose for each item so that someone else can follow your observations.
Feature version, update, and support policy
Java feature releases normally arrive every six months, in March and September. A feature version such as 25 identifies a language and platform release. A maintenance version such as 25.0.1 identifies an update within that feature line. It does not mean a new feature release occurred.
Java 17 (September 2021), Java 21 (September 2023), and Java 25 (September 2025) are useful dated LTS examples. LTS is a vendor support policy, not another language or a special compilation mode. Support periods, licensing, and patch availability depend on the vendor and offering. The current Oracle roadmap is one vendor's policy; do not apply its dates automatically to Azul or another provider.
This lab runs Zulu 27, not a hidden JDK 25. Read its release file to identify the vendor and x86_64 architecture. A newer runtime does not make every source file compatible with an older release. The browser emulator's execution speed is distinct from the Java feature version.
Targeting an older release
The guest uses an interpreted Java 27 build, so compilation needs no interpreter option. Wait for the shell prompt before entering the next command.
javac --release 25 ReleaseCheck.java asks this installed compiler to use the source/API rules and class-file target for release 25. javap -verbose exposes the emitted class-file major version: 69 for Java 25. Running that class on Java 27 still reports runtime 27, because compilation target and executing JVM are separate facts.
The switch does not install Java 25 and does not test your application on an actual Java 25 JVM. It is a useful compatibility control; a real release workflow also tests on its supported runtimes. Here the small fixture only prints java.version, so the comparison stays easy to explain.
Make an installation handover
Create a short installation map and a release timeline. Each note should separate an observed value from an explanation: tool path, vendor, feature version, target release, update example, and the meaning of LTS. These notes are guest files for practice, and disappear when you leave or reset the lesson.
References: JDK directory structure, javac --release, and Oracle Java support roadmap.
JDK
Runtime components plus tools such as javac and jshell.
Release target
--release chooses compilation compatibility rules, not the executing JVM.
LTS
A vendor commitment about a feature line; it is not a language feature.
Compare installed tool versions
Read java and javac versions. Identify feature version 27 in both outputs; do not mistake a build suffix for a different feature release.
java --versionjavac --versionBoth tools report 27
Resolve the actual installation
Print JAVA_HOME, locate java and javac through PATH, then resolve their links. Compare the resolved executables to the installation root. No file should be copied or replaced.
printf "%s\n" "$JAVA_HOME"command -v java javacreadlink -f "$(command -v java)" "$(command -v javac)"/opt/java/bin/java and /opt/java/bin/javac
Inspect the JDK directory map
List bin, conf, lib, jmods, include, legal, and release. Read release to identify the source-built OpenJDK, feature version 27, and x86_64. A missing jre subdirectory is not evidence that the runtime is absent.
ls -d "$JAVA_HOME"/{bin,conf,lib,jmods,include,legal,release}cat "$JAVA_HOME/release"JAVA_VERSION="27" and OS_ARCH="x86_64"
Identify runtime and development tools
List java, javac, jshell, jar, and javadoc in bin. Read jshell --version. Explain which tool launches bytecode, which compiles source, and which offers a REPL.
ls -l "$JAVA_HOME"/bin/{java,javac,jshell,jar,javadoc}jshell --versionAll five tools are installed
Compile for release 25 and inspect the target
Compile the supplied source with --release 25, then use javap -verbose. Find major version 69. This selects a compile target without changing the installed JVM.
cd ~/java-labcat ReleaseCheck.javajavac --release 25 ReleaseCheck.javajavap -verbose ReleaseCheck | head -20major version: 69
Observe the executing runtime
Run ReleaseCheck. Its printed java.version belongs to the JVM executing the class. Explain why a release-25 class prints runtime 27 in this lab.
java ReleaseCheckruntime=27...
Write an installation map
Record the observed root and the purpose of each supplied directory in installation.txt. Include the distinction between the runtime and compiler. Read the file back so you can check your handover.
printf '%s\n' 'JAVA_HOME=/opt/java' 'bin: java runs bytecode; javac compiles source; jshell explores snippets' 'conf: configuration' 'lib: JVM and runtime modules' 'jmods: modules for tooling' 'include: native headers' 'legal: notices' 'release: vendor, version, architecture' > installation.txtcat installation.txtInstallation map with observed paths and tool jobs
Separate releases, updates, and LTS
Write a dated timeline with the three LTS examples and the difference between a feature release, maintenance update, and vendor support policy. Read the actual vendor from release again rather than asserting Oracle support dates for this source-built OpenJDK installation.
printf '%s\n' '17: September 2021; LTS example' '21: September 2023; LTS example' '25: September 2025; LTS example' 'Feature releases: normally March and September' '25.0.1: maintenance update within feature 25' 'LTS: vendor support policy, not a language mode' > releases.txtcat releases.txtgrep -E "IMPLEMENTOR|JAVA_VERSION|OS_ARCH" "$JAVA_HOME/release"Dated release timeline and observed OpenJDK metadata
You completed the tooling workflow using real commands and files. Explain each result before moving on; tool output is evidence, not a substitute for the Java rule behind it.
Enable JavaScript to run the live terminal and track your progress.