Downloading and Installing JDK 1.7.0 on Windows

This section provides a tutorial example on how to download and install JDK 1.7.0 (Java SE 7) on a Windows XP system. A simple Java program was entered, compiled, and executed with the new JDK installation.

Downloading and installing JDK 1.7.0 (Java SE 1.7) on a Windows system is easy. Here is what I did on my Windows XP system in year 2012:

To test the installation, open a command window to try the java command. If you are getting the following output, your installation was ok:

C:\>"\Program Files\Java\jdk1.7.0_03\bin\java.exe" -version
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)

Once JDK is installed, you can try to use it to compile and execute a simple Java program:

1. Use Notepad to enter the following Java program into a file called

class Hello {
   public static void main(String[] a) {
      System.out.println("Hello world!"); 	

2. Then compile this program in a command window with the javac command:

C:\>"\Program Files\Java\jdk1.7.0_03\bin\javac.exe"

3. To execute the program, use the java command:

C:\>"\Program Files\Java\jdk1.7.0_03\bin\java.exe" Hello
Hello world!

Congratulations, you have successfully entered, compiled and executed your first Java program with JDK 1.7.0.

Last update: 2012.

Table of Contents

 About This JDK Tutorial Book

 Downloading and Installing JDK 1.8.0 on Windows

Downloading and Installing JDK 1.7.0 on Windows

 Downloading and Installing JDK 1.6.2 on Windows

 Java Date-Time API

 Date, Time and Calendar Classes

 Date and Time Object and String Conversion

 Number Object and Numeric String Conversion

 Locales, Localization Methods and Resource Bundles

 Calling and Importing Classes Defined in Unnamed Packages

 HashSet, Vector, HashMap and Collection Classes

 Character Set Encoding Classes and Methods

 Character Set Encoding Maps

 Encoding Conversion Programs for Encoded Text Files

 Socket Network Communication

 Datagram Network Communication

 DOM (Document Object Model) - API for XML Files

 SAX (Simple API for XML)

 DTD (Document Type Definition) - XML Validation

 XSD (XML Schema Definition) - XML Validation

 XSL (Extensible Stylesheet Language)

 Message Digest Algorithm Implementations in JDK

 Private key and Public Key Pair Generation

 PKCS#8/X.509 Private/Public Encoding Standards

 Digital Signature Algorithm and Sample Program

 "keytool" Commands and "keystore" Files

 KeyStore and Certificate Classes

 Secret Key Generation and Management

 Cipher - Secret Key Encryption and Decryption

 The SSL (Secure Socket Layer) Protocol

 SSL Socket Communication Testing Programs

 SSL Client Authentication

 HTTPS (Hypertext Transfer Protocol Secure)

 Outdated Tutorials


 PDF Printing Version