Java Lab
According to Sun, 3 billion devices run Java. There are many devices where Java is currently used.

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.

    1. 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.

    2. 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

    Install Java on Windows Help

  1. Click on Download JDK. For Java latest version.

    Add-on: or you can download IDE (Netbeans). Click on Download JDK with NetBeans.

  2. Next,

  3. Accept License Agreement

  4. Download latest JDK version (32-bit or 64 bit) of Java for Windows.

  5. When the download is complete, run the setup to install JDK. Click Next.

  6. When the installation is completed click Close.

  7. Proceed to Install IDE.

    Install Java on Mac Help

  1. Click on Download JDK. For Java latest version.

  2. Next,

  3. Accept License Agreement

  4. Download latest JDK version of Java for macOS.

  5. When the download is complete, run the setup to install JDK. Click Next.

  6. When the installation is completed click Close.

  7. Proceed to Install IDE.

    Install Java on Linux Help

  1. Click on Download JDK. For Java latest version.

  2. Next,

  3. Accept License Agreement

  4. Download latest JDK (32-bit) rpm, tar.gz file and to install (64-bit) Java for Linux.

  5. 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/

  6. Move the .tar.gz archive binary to the current directory, Unpack the tarball and install Java

    tar zxvf jdk-xxxx-linux-i586.tar.gz

  7. 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.

  8. If you using Java for RPM based Linux Platforms, Go to Java for RPM based Linux Platforms.

  9. Proceed to Install IDE.

    Install Java on Solaris SPARC Help

  1. Click on Download JDK. For Java latest version.

  2. Next, Accept License Agreement

  3. 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

  4. Move the .tar.gz archive binaries to the current directory.

  5. 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 -

  6. Proceed to Install IDE.