Check if JDK is Already Installed
Open a terminal and run the following command to check Java JRE:
$ java -version
Or run the following command to check Java Compiler:
$ javac -version
-
Verify the output.
-
If the command returns not found or a version number less than
java version "1.6.x_xx"
, continue to Download JDK for your operating system. -
If you already have JDK
v1.6.x
or later, proceed to Java Path Setup.
-
Install JDK
Select your Operating System:
Java Help Center - Installing Java
-
Click on
Download
JDK. For Java latest version.Add-on: or you can download IDE (Netbeans). Click on
Download
JDK with NetBeans. -
Next,
-
Accept License Agreement
-
Download latest JDK version (32-bit or 64 bit) of Java for Windows.
-
When the download is complete, run the setup to install JDK. Click
Next
. -
When the installation is completed click
Close
. -
Proceed to Install IDE.
Install Java on Windows Help
-
Click on
Download
JDK. For Java latest version. -
Next,
-
Accept License Agreement
-
Download latest JDK version of Java for macOS.
-
When the download is complete, run the setup to install JDK. Click
Next
. -
When the installation is completed click
Close
. -
Proceed to Install IDE.
Install Java on Mac Help
-
Click on
Download
JDK. For Java latest version. -
Next,
-
Accept License Agreement
-
Download latest JDK (32-bit) rpm, tar.gz file and to install (64-bit) Java for Linux.
-
When the (32-bit) JDK download is complete, Change to the directory in which you want to install. Type:
cd directory_path_name
For example, to install the software in the /usr/java/ directory, Type:
cd /usr/java/
-
Move the .tar.gz archive binary to the current directory, Unpack the tarball and install Java
tar zxvf jdk-xxxx-linux-i586.tar.gz
-
The Java files are installed in a directory called /usr/java/jdk-xx/ in the current directory.
Delete the
rm -rf *.tar.gz
file if you want to save disk space. -
If you using Java for RPM based Linux Platforms, Go to Java for RPM based Linux Platforms.
-
Proceed to Install IDE.
Install Java on Linux Help
-
Click on
Download
JDK. For Java latest version. -
Next, Accept License Agreement
-
Change directory to the location where you would like to be installed.
cd directory_path_name
For example, to install the software in the /usr/java directory:
cd /usr/java
-
Move the .tar.gz archive binaries to the current directory.
-
Unpack the tarball and install Java
On 64-bit SPARC processors:
gzip -dc jdk-xxx-solaris-sparcv9.tar.gz | tar xf -
On x64/EM64T processors:
gzip -dc jdk-xxx-solaris-x64.tar.gz | tar xf -
-
Proceed to Install IDE.
Install Java on Solaris SPARC Help