0% found this document useful (0 votes)
6 views

Java and the Windows Command Prompt

The document provides instructions for installing the Java SE Development Kit and configuring the system PATH variable on Windows. It details how to verify the installation using the Command Prompt and suggests customizing the Command Prompt settings for better usability. Key commands include checking the Java and javac versions to ensure proper installation.

Uploaded by

fookchia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Java and the Windows Command Prompt

The document provides instructions for installing the Java SE Development Kit and configuring the system PATH variable on Windows. It details how to verify the installation using the Command Prompt and suggests customizing the Command Prompt settings for better usability. Key commands include checking the Java and javac versions to ensure proper installation.

Uploaded by

fookchia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

You will use the Java compiler javac to compile your Java programs and the Java

interpreter java to run them. You should skip the first step if Java is already
installed on your machine.

Download and install the latest version of the Java Platform, Standard Edition
Development Kit (Java SE 6 Update 27). Note the installation directory for later—
probably something like C:\Program Files\Java\jdk1.6.0_27\bin.

To make sure that Windows can find the Java compiler and interpreter:

Select Start -> Computer -> System Properties -> Advanced system settings -
> Environment Variables -> System variables -> PATH.

[ In Vista, select Start -> My Computer -> Properties -> Advanced ->
Environment Variables -> System variables -> PATH. ]

[ In Windows XP, Select Start -> Control Panel -> System -> Advanced ->
Environment Variables -> System variables -> PATH. ]

Prepend C:\Program Files\Java\jdk1.6.0_27\bin; to the beginning of the PATH


variable.

Click OK three times.

Command-line interface

You will type commands in an application called the Command Prompt.

Launch the command prompt via All Programs -> Accessories -> Command Prompt.
(If you already had a command prompt window open, close it and launch a new one.)
You should see the command prompt; it will look something like:

Microsoft Windows [Version 6.1.7600]


Copyright (c) 2009 Microsoft Corporation. All rights reserved.

To check that you have the right version of Java installed, type the text in
boldface below. You should see something similar to the information printed below.
(It's important that you see the number 1.6 or 1.5 for the Java version number, but
the rest is not critical.)

C:\Users\username>java -version
java version "1.6.0_27"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0_27-b07)
Java HotSpot(TM) Client VM (build 1.6.0_27-b13, mixed mode, sharing)

Then type:

C:\Users\username>javac -version
javac 1.6.0_27

Since you will be using the Command Prompt frequently, we recommend customizing
the default settings. Right-click the title bar of an open Command Prompt window,
select Properties and then:

Set Layout -> Screen Buffer Size to 80 x 500.

Select Options -> Edit Options -> QuickEdit Mode.

Select Options -> Edit Options -> Insert Mode.

You might also like