JDB - Installation


Advertisements


This chapter explains how to install JDB on Windows and Linux based systems. JDB is a part of JDK. Therefore, JDK installation is enough for using JDB in command prompt.

System Requirements

Here are the system requirements for installing JDB:

JDK Java SE 2 JDK 1.5 or above
Memory 1 GB RAM (recommended)
Disk Space No minimum requirement
Operating System Version Windows XP or above, Linux

Follow the simple steps given below to install JDB on your system.

Step 1: Verifying Java Installation

First of all, you need to have Java Software Development Kit (SDK) installed on your system. To verify this, execute any of the two commands depending on the platform you are working on.

If the Java installation has been done properly, then it displays the current version and specifications of Java installation. A sample output is given in the following table.

Platform Command Sample Output
Windows

Open command console and type:

\>java –version

Java version "1.7.0_60"

Java (TM) SE Run Time Environment (build 1.7.0_60-b19)

Java Hotspot (TM) 64-bit Server VM (build 24.60-b09,mixed mode)

Linux

Open command terminal and type:

$java –version

java version "1.7.0_25"

Open JDK Runtime Environment (rhel-2.3.10.4.el6_4-x86_64)

Open JDK 64-Bit Server VM (build 23.7-b01, mixed mode)

We assume the readers of this tutorial have Java SDK version 1.7.0_60 installed on their system. In case you do not have Java SDK, download its current version from the link http://www.oracle.com/technetwork/java/javase/downloads/index.html and install it.

Step 2: Setting Up Java Environment

Set the environment variable JAVA_HOME to point to the base directory location where Java is installed on your machine. For example,

Platform Description
Windows set JAVA_HOME to C:\ProgramFiles\java\jdk1.7.0_60
Linux export JAVA_HOME=/usr/local/java

Append the full path of Java compiler location to the System Path.

Platform Description
Windows Append the String "C:\Program Files\Java\jdk1.7.0_60\bin" at the end of the system variable PATH.
Linux export PATH=$PATH:$JAVA_HOME/bin/

Execute the command java -version from the command prompt as explained above.

Step 3: Verifying JDB Installation

Verify the JDB version as follows:

Platform Command Sample Output
Windows

Open command console and type:

\>jdb –version

This is JDB version 1.6 (Java SE version 1.7.0_60)
Linux

Open command terminal and type:

$jdb –version

This is JDB version 1.6 (Java SE version 1.7.0_60)


Advertisements