Install Java on Linux offline

Step 1. Download the package.

Step 2. Create a directory named “jdk” under /opt/
jdk can have all the packages which are installed manually.

Step 3. Extract and keep the package under /opt/jdk
tar -zxf jdk-8u111-linux-i586.tar.gz -C /opt/jdk

Step 4. Set the path:
update-alternatives –install /usr/bin/java java /opt/jdk/jdk1.8.0_111/bin/java 100
update-alternatives –install /usr/bin/javac javac /opt/jdk/jdk1.8.0_111/bin/java 100

Step 5. Verification: Use following command to check if Java is installed properly or not.
java -version

Advertisements
This entry was posted in Linux and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s