• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

Installation of JAVA 8 ( JDK 8u45) on Linux Systems

{{postValue.id}}

Installation of JAVA 8

Java 8 is known for cross platform availability developed by Sun Micro systems in 1995. It is fast, secure and reliable nature. Linux distribution comes with other version of Java called OpenJDK which is an open source implementation of Java application. Installation of JAVA 8 is explained in this manual.

To install Java 8 in Linux

To verify the version of installed Java

[root@linuxhelp~]# java -version
java version " 1.7.0_75" 
OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-2)
OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode)

To make a directory location to install Java

[root@linuxhelp~]# mkdir /opt/java & &  cd /opt/java

To download Java (JDK) 8u45

Download source tarball files for your system architecture from official Java download page.

The source tarball file-names are as follows

jdk-8u45-linux-i586.tar.gz [For 32-bit Systems]
jdk-8u45-linux-x64.tar.gz [For 64-bit Systems]

You can also use wget command to download files directly into the /opt/java directory.

--------------- For 32-bit Systems ---------------

[root@linuxhelp~]# cd /opt/java
[root@linuxhelp~]# wget --no-cookies --no-check-certificate --header " Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F  oraclelicense=accept-securebackup-cookie"  " http://download.oracle.com/otn-pub/java/jdk/8u45-b14/jdk-8u45-linux-i586.tar.gz" 


--------------- For 64-bit Systems --------------

[root@linuxhelp~]# cd /opt/java
[root@linuxhelp~]# wget --no-cookies --no-check-certificate --header " Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2

To extract the tarball

Use tar with zxvf options command to extract the tarball.

[root@linuxhelp~]# tar -zxvf jdk-8u45-linux-i586.tar.gz        [For 32-bit Systems]
[root@linuxhelp~]# tar -zxvf jdk-8u45-linux-x64.tar.gz        [For 64-bit Systems]

To move to the extracted directory

update-alternatives is the command used to move to the extracted directory.

[root@linuxhelp~]# cd jdk1.8.0_45/
[root@linuxhelp~]# update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_45/bin/java 100  
[root@linuxhelp~]# update-alternatives --config java

To update javac (java compiler) alternatives

[root@linuxhelp~]# update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.8.0_45/bin/javac 100
[root@linuxhelp~]# update-alternatives --config javac

To update jar alternatives

[root@linuxhelp~]# update-alternatives --install /usr/bin/jar jar /opt/java/jdk1.8.0_45/bin/jar 100
[root@linuxhelp~]# update-alternatives --config jar

To Set up Java Environment Variables

[root@linuxhelp~]# export JAVA_HOME=/opt/java/jdk1.8.0_45/    
[root@linuxhelp~]# export JRE_HOME=/opt/java/jdk1.8.0._45/jre     
[root@linuxhelp~]# export PATH=$PATH:/opt/java/jdk1.8.0_45/bin:/opt/java/jdk1.8.0_45/jre/bin

To verify the Java version

[root@linuxhelp~]# java -version
java version " 1.8.0_45" 
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

if OpenJDK is not used then you can remove using the following command


[root@linuxhelp~]# apt-get remove openjdk-* 

Tags:
jackson
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

No Java Runtime Environment (JRE) was found on this system

A

check wheather JRE is properly installed if yes and also check for the proper parth for environment variable is set or not

Q

java command not found

A

use env command to check wheater the java environment variable is present or not

Q

what is the purpose of using alternatives command while installing java on a linux machine

A

It can maintain multiple versions of java and allows us to easily switch between them

Q

How to enable javascript in chrome web browser

A

open chrome ==> settings ==> search javascript ==> enable javascript

Q

How to compile a java code on linux machie using command

A

javac filename.java

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help legeek ?
Installation of the call center module

hello

I wish to install a call center in virtual with issabel, I downloaded the latest version of it , but I don' t arrive to install the call center module in issabel. please help me

thanks!

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.