Archived: Download and Install 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 7 system:

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

herong> \progra~1\java\jdk1.7.0_45\bin\java" -version

java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, 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 Hello.java:

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:

herong> \progra~1\Java\jdk1.7.0_45\bin\javac" Hello.java

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

herong> \progra~1\Java\jdk1.7.0_45\bin\java" Hello

Hello world!

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

Table of Contents

 About This Book

 JVM (Java Virtual Machine) Specification

 Java HotSpot VM - JVM by Oracle/Sun

 java.lang.Runtime Class - The JVM Instance

 java.lang.System Class - The Operating System

 ClassLoader Class - Class Loaders

 Class Class - Class Reflections

 JVM Runtime Data Areas

 JVM Stack, Frame and Stack Overflow

 Thread Testing Program and Result

 CPU Impact of Multi-Thread Applications

 I/O Impact of Multi-Thread Applications

 CDS (Class Data Sharing)

 Micro Benchmark Runner and JVM Options

 Micro Benchmark Tests on "int" Operations

 Micro Benchmark Tests on "long" Operations

 Micro Benchmark Tests in JIT Compilation Mode

 Micro Benchmark Tests on "float" and "double" Operations

 OpenJ9 by Eclipse Foundation

 JRockit JVM 28.2.7 by Oracle Corporation

Archived Tutorials

 Archived: Download and Install Latest JDK 10 on Windows

 Archived: Download and Install JDK 1.8.0 on Windows

Archived: Download and Install JDK 1.7.0 on Windows

 Archived: Download and Install Java SE 1.6 Update 2

 Archived: Installing JRockit JVM 8.0

 Archived: Testing with LongWhile.java

 Archived: Testing with LongSleep.java

 Archived: GCTest.java - Garbage Collection Test Program

 Archived: GC Test - Constant Memory Requirement

 Archived: GC Test - Periodical Memory Requirement

 Archived: GC Test - Releasing Old vs. New Objects

 Archived: GC Test - JDK 1.4.0 vs. JDK 1.3.1

 Archived: GC Test - Client vs. Server

 Archived: StringBuffer Testing Program

 Archived: Installing JRockit JVM 7.0

 Archived: Running JRockit JVM with Management Console

 References

 Full Version in PDF/EPUB