This script automates the installation of Oracle Java SE 23 on Debian-based Linux distributions (e.g., Ubuntu, Zorin OS).
-
Download the script
install_java23.sh:- Go to the directory where you saved the file (either in file manager or CMD).
- If using file manager, right-click on an empty spot and select "Open Terminal Here."
-
Make the script executable:
chmod +x install_java23.sh
-
Run the script:
./install_java23.sh
- Updates package lists.
- Adds the Oracle Java PPA.
- Installs Oracle Java SE 23.
- Sets Java SE 23 as the default Java version.
- Verifies the installation.
Enjoy!