As of 2019, Oracle requires a free account to download older JDK versions from their archive.
# Make executable chmod +x jdk-6u45-linux-x64.bin
Click the download link → (free to create). Download Sun Jdk 6 For Linux
Edit /etc/profile or ~/.bashrc :
uname -m
Once the .bin file is downloaded, follow these terminal commands to install it:
Oracle maintains the page, which contains every JDK version back to 1.4. As of 2019, Oracle requires a free account
Visit the Oracle Java Archive . Direct link path: Oracle.com → Downloads → Java → Java Archive → Java SE 6