Oracle Java Installer
Updated: Friday, 04. October 2019 04:46 PM UTC
Oracle java (jdk/jre) installler script for linux. It simplifies the installation of Oracle java from a downloaded source (tar.gz). It also maintains consistency among multiple versions of java (jdk/jre). Uninstalling any java version installed with this script will fall back to the next most recently installed version of java.
Give the install.sh file execution permission and run it in terminal (with root privilege).
sudo ./install.sh
On Ubuntu:
sudo add-apt-repository -y ppa:neurobin/ppa
sudo apt-get update
sudo apt-get install oraji
Run in terminal:
sudo oraji '/path/to/the/jdk_or_jre_archive'
(or run sudo /path/to/oraji /path/to/the/jdk_or_jre_archive
after giving the oraji script execution permission if you didn't install the script).
That's it. Now if you want to populate JAVA_HOME and other environment variables run source /etc/profile
or logout and login.
oraji -u
(or path/to/oraji -u
if you didn't install the oraji script).oraji -u version
(or /path/to/oraji -u version
if you didn't install the script).Note:
/usr/lib/jvm/jdk|jre<version_number>
and comprises with both the jdk/jre part and the version_number part.oraji -u version
(with a version argument) unless you are sure of it. Simply run oraji -u
and let oraji detect the version for you.source /etc/profile
manually to populate them immediately), mozilla plugin will be restored to the fallback java.N.B: The uninstallation method is only for the oracle java installed with the oraji
script. It deletes the /usr/lib/jvm/jdk|jre<version_number>
directory and all exports and environment variables that was included in /etc/profile by oraji and the mozilla plugin. If a fall back java is available, exports and environment variables will be available for this java version and mozilla plugin will be restored.
Switching between Java versions was never easier
You can install multiple Java versions and set whichever version you want as your current Java.
oraji -c
sudo oraji -s
and select the version from the list.Option | Alt. Option | Details |
---|---|---|
-v |
--version |
Show version |
-h |
--help |
Show help |
-i |
--install |
Install from an archive path |
-u |
--uninstall |
Uninstall java |
-s |
--set |
Set a java version |
-c |
--check |
Show the installed java versions |
4.1.0
: Tue Aug 23 23:38:01 UTC 2016¶-s
option to activate an installed Java version-c
option to check installed Java version-h
option for help-i
option for an alternative to provide archive path4.0.2
: Sat Jan 9 16:16:23 UTC 2016¶man oraji
.4.0.1
: Wed Dec 23 04:34:25 UTC 2015¶4.0.0
: Tue Dec 22 23:37:16 UTC 2015¶oraji -v
provides version info of oraji
itself.oraji -u
to uninstall java.3.0.1
: Tue Dec 22 20:58:42 UTC 2015¶3.0.0
: Tue Dec 22 19:32:07 UTC 2015¶