Wednesday, May 8, 2013

How To Install Java in Linux(JDK/JRE)


How To Install Java in Linux

How To Install JDK/JRE in Linux

Which Java package do I need?
  • JDK: (Java Development Kit). For Java Developers. Includes a complete JRE plus tools for developing, debugging, and monitoring Java applications.
  • Server JRE: (Server Java Runtime Environment) For deploying Java applications on servers. Includes tools for JVM monitoring and tools commonly required for server applications, but does not include browser integration (the Java plug-in), auto-update, nor an installer.
  • JRE: (Java Runtime Environment). Covers most end-users needs. Contains everything required to run Java applications on your system.
Difference Between JDK and JRE:

The "JDK" is the Java Development Kit. I.e., the JDK is bundle of software that you can use to develop Java based software. The "JRE" is the Java Runtime Environment. I.e., the JRE is an implementation of the Java Virtual Machine which actually executes Java programs.
Typically, each JDK contains one (or more) JRE's along with the various development tools like the Java source compilers, bundling and deployment tools, debuggers, development libraries, etc.
What is the difference between the JRE and the JDK ?

JRE
(Java Runtime environment)
JDK
(Java Development Kit)
It is an implementation of the Java Virtual Machine* which actually executes Java programs.It is a bundle of software that you can use to develop Java based applications.
Java Runtime Environment is a plug-in needed for running java programs.Java Development Kit is needed for developing java applications.
The JRE is smaller than the JDK so it needs less Disk space.The JDK needs more Disk space as it contains the JRE along with various development tools.
The JRE can be downloaded/supported freely from
java.com
The JDK can be downloaded/supported freely from
oracle.com/technetwork/java/javase/downloads/
It includes the JVM , Core libraries and other additional components to run applications and applets written in Java.It includes the JRE, set of API classes, Java compiler, Webstart and additional files needed to write Java applets and applications.
How To Install Java in Linux(JDK/JRE)

1. How To Install Java (JDK/JRE) in Fedora :

For fedora go to terminal and login as Super user (Su)
then put the following commands in terminal window 

yum install sun-java6-jre sun-java6-plugin

(OR)

These instructions use the following file:
    jre-7u<version>-linux-x64.tar.gz

1. Download the file. Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JRE into the system location.
2. Change directory to the location where you would like the JRE to be installed. Move the .tar.gz archive binary to the current directory.
3. Unpack the tarball and install the JRE.
    % tar zxvf jre-7u<version>-linux-x64.tar.gz
The JRE files are installed in a directory called jre1.7.0_<version> in the current directory.
4. Delete the .tar.gz file if you want to save disk space.

2. How To Install  Java (JDK/JRE) in Ubuntu :

sudo apt-get install sun-java6-jre sun-java6-plugin
sudo update-alternatives –config java

(OR)

These instructions use the following file:
    jre-7u<version>-linux-x64.tar.gz

1. Download the file. Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JRE into the system location.
2. Change directory to the location where you would like the JRE to be installed. Move the .tar.gz archive binary to the current directory.
3. Unpack the tarball and install the JRE.
    % tar zxvf jre-7u<version>-linux-x64.tar.gz
The JRE files are installed in a directory called jre1.7.0_<version> in the current directory.
4. Delete the .tar.gz file if you want to save disk space.
3.How To Install Java (JDK/JRE) in OpenSuse :
 
yast install sun-java6-jre sun-java6-plugin
(OR)

Installation of the 64-bit JDK on Linux Platforms

This procedure installs the Java Development Kit (JDK) for 64-bit Linux, using an archive binary file (.tar.gz).
These instructions use the following file:
    jdk-7u<version>-linux-x64.tar.gz
1. Download the file. Before the file can be downloaded, you must accept the license agreement. The archive binary can be installed by anyone (not only root users), in any location that you can write to. However, only the root user can install the JDK into the system location.
2. Change directory to the location where you would like the JDK to be installed. Move the .tar.gz archive binary to the current directory.
3. Unpack the tarball and install the JDK.
    % tar zxvf jdk-7u<version>-linux-x64.tar.gz
The Java Development Kit files are installed in a directory called jdk1.7.0_<version> in the current directory.
4. Delete the .tar.gz file if you want to save disk space.

How To Install Java in Linux(JDK/JRE)

How To Install JDK/JRE in Linux

No comments:

Post a Comment

Linux Tips and tricks,Online Linux Helpers