Prepend your PATH variable with that directory in your .bashrc file.
I am using Knoppix 3.8.1 and it is bundled with Java 1.4.2. I do not know how to uninstall Java 1.4 and since I need the new features of Java 1.5, I decided to install Java 1.5 over it (some of you may think its not a very good idea).
Now, when I run a java -version at the command prompt, it still says 1.4.2. So I explicitly exported the PATH of my new Java 1.5
"export PATH=/home/java1_5/bin"
After that "java -version" replies with 1.5, which is correct. However when I restart the shell, the PATH seems to be reset to its original state and won't recognize my Java 1.5!
Please help!
Prepend your PATH variable with that directory in your .bashrc file.
Redo your symlink in /usr/bin to point to your copy of the java.

Acer Aspire 14" AI Copilot+PC Laptop Core Ultra 5 226V Gen 4 ARC 16GB 1TB Refurb
$480.63
External SSD 1TB 2TB Portable Hard Drive USB 3.1 Type-C High Speed PC Mac
$16.99
Apple Macbook Pro 16" i9-9880h 64GB 1TB - Good
$489.99
SGIN 15.6" Laptop 16GB RAM 1TB SSD Win 11 Intel i3-10100Y Backlit Keyboard FHD
$335.99
Acer Predator Helios Neo 16S AI 16" i9 275HX 2S RTX 5070 Ti 32GB 1TB SSD Refurb
$1794.16
1TB Kingston DataTraveler Max DTMAX/1TB USB Type-C Flash Drive
$86.95
Apple iPad Pro 12.9" 5th Gen 128GB 256GB 1TB 2TB Wi-Fi Or Cellular - Good
$489.99
Fanxiang 1/2/5/10Pcs 2.5'' SATA SSD Lot 1TB 2TB 4TB 512GB 256GB TLC Internal SSD
$129.99
NEW 2026 SGIN 18.5" Laptop Windows 11 PRO Intel N5095 16GB DDR4 1024GB SSD
$444.99
LaCie Rugged SSD 1TB Portable SSD USB3.1 Gen2 IP67 Waterproof
$475.00