FG
💻 Software

Why is java -version returning a different version to the one defined in JAVA_HOME?

Fresh5 days ago
Mar 15, 2026131330 views
Confidence Score0%
0%

Problem

My JAVA_HOME is set to (Java 1.5). However, when I run I get the following: How can I use the 1.5 version?

Error Output

java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Why is java -version returning a different version to the one defined in JAVA_HOME?

Low Risk

Run at your command prompt. On my system, it printed something quite unexpected: Verifying there really is a Java there: So one solution is to ensure your preferred Java is in the PATH before . I also tried looking in the Java control panel to see i…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment