Join our Discord Server
Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).

Installing Java Development Toolkit (JDK) on Linux

2 min read

Installing Java Development toolkit on Linux is always matter of difficulty since Oracle provides both RPM and tarballs in their official website. Installing RPM is pretty simple but installing through tarballs need sufficient environmental variable declaration which is little different from Windows Operating System.

javalinux

Follow the steps mentioned below to install java-1.6.

1.Download jdk-6u16-linux-x64.bin (From the URL mentioned in the prerequisites section) to /opt directory.

2.Change the permission of jdk-6u16-linux-x64.bin file to 755.

[root@bang opt]# chmod 755 jdk-6u16-linux-x64.bin

3.Execute the jdk-6u16-linux-x64.bin file to start installation.

[root@bang opt]# ./jdk-6u16-linux-x64.bin

Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA 2 PLATFORM STANDARD EDITION DEVELOPMENT KIT 6.0

SUN MICROSYSTEMS, INC. (“SUN”) IS WILLING TO LICENSE THE

SOFTWARE IDENTIFIED BELOW TO YOU ONLY UPON THE CONDITION

THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS BINARY

CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE TERMS

(COLLECTIVELY “AGREEMENT”). PLEASE READ THE AGREEMENT

CAREFULLY. BY DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU

ACCEPT THE TERMS OF THE AGREEMENT. INDICATE ACCEPTANCE BY

SELECTING THE “ACCEPT” BUTTON AT THE BOTTOM OF THE

AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY ALL THE

TERMS, SELECT THE “DECLINE” BUTTON AT THE BOTTOM OF THE

AGREEMENT AND THE DOWNLOAD OR INSTALL PROCESS WILL NOT

CONTINUE.

1. DEFINITIONS. “Software” means the identified above in

binary form, any other machine readable materials

(including, but not limited to, libraries, source files,

header files, and data files), any updates or error

corrections provided by Sun, and any user manuals,

programming guides and other documentation provided to you

by Sun under this Agreement. “General Purpose Desktop

Computers and Servers” means computers, including desktop,

laptop and tablet computers, or servers, used for general

computing functions under end user control (such as but not

specifically limited to email, general purpose Internet

browsing, and office suite productivity tools). The use of

Software in systems and solutions that provide dedicated

functionality (other than as mentioned above) or designed

for use in embedded or function-specific software

applications, for example but not limited to: Software

embedded in or bundled with industrial control systems,

wireless mobile telephones, wireless handheld devices,

kiosks, TV/STB, Blu -ray Disc devices, telematics and

network control switching equipment, printers and storage

management systems, and other related systems are excluded

from this definition and not licensed under this Agreement.

“Programs” means Java technology applets and applications

intended to run on the Java Platform Standard Edition (Java

SE) ptaform on Java-enabled General Purpose Desktop

Computers and Servers.

4.Press the Tab key until you reach the End of License Agreement Screen

5.Type yes and hit Enter key

6.It will installs jdk-1.6.0_16

F. Source Code. Software may contain source code that,

unless expressly licensed for other purposes, is provided

solely for reference purposes pursuant to the terms of this

Agreement. Source code may not be redistributed unless

expressly provided for in this Agreement.

G. Third Party Code. Additional copyright notices and

license terms applicable to portions of the Software are set

forth in the THIRDPARTYLICENSEREADME.txt file. In addition

to any terms and conditions of any third party

opensource/freeware license identified in the

THIRDPARTYLICENSEREADME.txt file, the disclaimer of warranty

and limitation of liability provisions in paragraphs 5 and 6

of the Binary Code License Agreement shall apply to all

Software in this distribution.

H. Termination for Infringement. Either party may

terminate this Agreement immediately should any Software

become, or in either party’s opinion be likely to become,

the subject of a claim of infringement of any intellectual

property right.

I. Installation and Auto-Update. The Software’s

installation and auto-update processes transmit a limited

amount of data to Sun (or its service provider) about those

specific processes to help Sun understand and optimize them.

Sun does not associate the data with personally identifiable

information. You can find more information about the data

Sun collects at http://java.com/data/.

For inquiries please contact: Sun Microsystems, Inc., 4150

Network Circle, Santa Clara, California 95054, U.S.A.

(LFI#143333/Form ID#011801)

Do you agree to the above license terms? [yes or no]

yes

Unpacking…

Checksumming…

0

0

Extracting…

UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).

inflating: jdk-6u16-linux-x64-rpm

Preparing… #################################### [100%]

1:jdk #################################### [100%]

Done.

#

7.Add below lines in /etc/profile file to define JAVA_HOME and its PATH

export JAVA_HOME=/usr/java/jdk-1.6.0_16

export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:

8. Verify the java installation by running the following command in the new window.`

[root@bang opt]# java -version

java version “1.6.0_16”

Java(TM) SE Runtime Environment (build 1.6.0_16-b01)

Java HotSpot(TM) 64-Bit Server VM (build 14.2-b01, mixed mode)

[root@bangvbapp opt]#

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Distinguished Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 700+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 9800+ members and discord server close to 2600+ members. You can follow him on Twitter(@ajeetsraina).
Join our Discord Server