Download & Install the JDK SE v6
(Free Web Tutorials & Resources)
(This is an older Tutorial)
by Michael Thomas
(updated 08/09/2010)
Java First Steps Home Page
To begin to play with Java, you need to download the following files:
Java JDK (Java Development Kit) aka SDK (Software Development Kit), JRE
(Java Runtime Environment) and the Java API Doc's. (Sun now has a
download manager that you can use to download large files. If you
desire to use a different download manager see my notes on "Download
Managers" at the bottom of this page)
Java Product Family
Summary of steps
-
Download the Java Products: JDK, DOC's, and JRE.
-
Install each of the products
-
Test the installs.
Download the Java Products
Download Links
- JDK 6 Update 24 (Version: 1.6.0_24) - Current Download versions for Windows OS as of
03/20/2011 that is not a beta version.
(Note: On 10/10/2011 the latest version was: Java SE 6 Update 27)
You will be downloading the JDK, JRE, and DOC's. Click the "Download" tab at the top, then
click Java SE.
- Go to:
http://www.oracle.com/technetwork/java/javase/overview/index.html
(Old link, keep for reference:
http://java.sun.com/j2se/)
- Click the "Download" tab which is next to the "Overview"
tab.
- Optional reading. Notes as of 06/10/08:
- Note: You may want to stay away from Beta versions.
- Here is a some info on the difference between the "JDK 6" and "JDK
6 with Java EE"
- Both have the Java SE (Standard Editon) JDK along with the
Java RE (Runtime Environment).
- The EE edition includes the Java SE and also supports:
web services, component-model, management, and communications
APIs that make it the industry standard for implementing
enterprise-class service-oriented architecture (SOA) and Web 2.0
applications.
- The EE edition is about 100meg larger than the SE.
- The EE edition also installs an Application Server with
default ports:
Admin Port: 4848
HTTP Port: 8080 (Warning: Default of
Tomcat is 8080
also.)
HTTPS Port: 8181
(Some Install Options: Create window service (to startup the app
server) )
The following will also be installed: (for Java EE 5 SDK)
Sun Java System Message Queue 4.1
Sun Java System Application Server 9.1
Java BluePrints
Sample Apps & tutorial called "Your First Cup"
- JDK Download:
- Locate the section "Java Platform, Standard Edition", "Java
SE 6 Update 24".
Click the link "Download JDK"
Click the "Download" button.
- (Note: This download will install both the Java SE Development Kit (JDK), the Java Runtime Environment (JRE).
The JDK is required if you want to compile a program. The JRE is
required if you want to run a Java program.)
FYI:
- Select your "Platform"
- Windows x64 - 64bit (ex: Win 7)
- Windows - 32bit (ex: Win XP Pro)
- Click "Continue"
- Click the link for the .exe file to download then click "Save"
(so you can save the file to your local!)
- jdk-6u24-windows-x64.exe - 66 Meg (Ex: Windows 64
bit)
- jdk-6u24-windows-i586.exe - 76 Meg (Ex:
Windows 32 bit)
- Documentation Download (Optional but every developer will want to
do this!):
- Optional Download Information
- Download just the JRE
When you install the JDK you also install the JRE. The JDK is
required if you want to compile a program. The JRE is required if
you want to run a Java program. So an end user will only need the
JRE.
You can download just the JRE by clicking on the link "JRE".
- Other Download Info
Install the JDK
Install Notes for: Java SE
Development Kit 6 Update 24
- Prepare PC for Installation
- User's "Environment Variables": temp & tmp (DO
NOT SKIP THIS STEP!)
I've seen the "bin\javac.exe" get installed with 0 bytes. The solution
is to make sure the User's "Environment Variables" temp & tmp is set
to "c:\temp" before starting the install.
I've seen other software installs have similar issues so I would leave it
set to c:\temp.
First, make sure that the directory exists - c:\temp
- Win 7: Start, Control Panel, "System & Security", "System", "Advanced System
Settings", click "Environment Variables" then look in the top section called
"User variables ...."
Edit and set to:
c:\temp
- Version JDK 1.6 Update 24 (Version: 1.6.0_24)
- Install the JDK & JRE (Example of Windows 64 bit
install)
File: jdk-6u24-windows-x64.exe -
Java SE Development Kit 6 Update 24
- Double click on the install file.
- Welcome Screen - click "Next"
- Custom Setup Screen
- Click "Change"
I suggest you use the following directory structure: c:\java\jdk1.6.0_24
Note: The default is: C:\Program
Files\Java\jdk1.6.0_21\
The spaces in "Program Files" will give you headaches down the road
and may be difficult to get certain applications working!
(Trust me on this one!)
Also you may want to have more than one JDK installed to support
different applications.
- Development Tools (300 Meg) - JDK & JRE
- Demos and Samples (46 Meg) - demos & source
- Source Code (49 Meg) - source for public API of Java
- Click "Next"
- Note: Looks like the next step was eliminated in this
install. I'll delete next time I check:
JRE Destination Folder Screen
Keep the default. Click "Next"
Note: Default =
C:\Program Files\Java\jre6\ - Because this is
just the Run Time I would use the default install value. The
other location could be: \java\jre6
- Click "Finish"
- Click "Product Registration Information" if you want to
register.
C:\java\jdk1.6.0_24\register.html
- Click "Finish".
- Note: No reboot is required.
- Readme File: C:\java\jdk1.6.0_24\README.html
- Environment Variables: JAVA_HOME
- Add/Verify Environment Variables so other tools/apps can use
(like Ant, etc...)
- Go to the Environment Variable add/edit screen:
- Win 7: Start, Control Panel, "System and Security",
"System", "Advanced System Settings", click the tab
"Advanced", Environment Variables
- Win XP Pro: Settings, Control Panel, System, Advanced tab,
click on "Environment Variable" button
- In the "System Variables" section:
Verify/Add the JAVA_HOME environment variable:
Click "New"
Variable Name: JAVA_HOME
Variable Value: <Full path to the home directory of your JDK
install>
Ex: C:\java\jdk1.6.0_24
(Note: The Sun java installs (JDK and/or JRE) modifies
the PATH variable and does not create the variable "JAVA_HOME".
Other Java tools may use this environment system variable
like: Ant)
- Do NOT do this section. Keep for reference
though.
In the "System Variables" section:
Edit the variable: Path
View the contents and add the following to the end (notice
the semicolon) if the install did not add it:
;C:\java\jdk1.6.0_24\bin
(Note: ;%JAVA_HOME%\bin could also be added
instead!)
- Install the Java Docs.
File: jdk-6u23-docs.zip (older
version jdk-1-6-doc.zip)
- NOTE: I suggest creating a separate directory for the Java
docs. Sometimes the latest JDK is a version ahead of the latest
docs.
Create the directory: C:\java\jdk1.6.0_23_docs
- Extract the zip file to the following into the directory you
created.
- Extract the file (make sure the unzip program keeps the directory
structure in the zip file).
It will create a directory called "docs/etc..." with all of the files.
Note: Extracts out to be 300 meg
- Your Finished with the Doc install.
-
C:\java\jdk1.6.0_23_docs\docs\index.html - view your docs!
OPTIONAL - Notes for:
Java EE 6 SDK (Update 1 U20)
- Java EE vs Java SE - looks like the "Enterprise Edition (EE)"
installs the "Standard Edition (SE)" and adds the following installs:
- GlassFish - Web application server
Test the Install
- Reboot your PC - To be on the safe side, let's reboot. Not
normally necessary.
- Java Docs - Using windows explorer launch the following file:
C:\java\jdk1.6.0_21\docs\index.html - Your browser will
display the page.
At the top of the page click on "API & Language" - This is the Java API.
- Go to a DOS prompt.
(Start, Programs, Command Prompt) or (Start, Run, then cmd.exe for XP,
Win2000, NT or command.com for Win 95/98)
- Test the JRE:
DOS Command
Ex: C:\>"C:\Program Files\Java\jre6\bin\java.exe" -fullversion
Ex return: java full version "1.6.0_21-b07"
- Test the JDK's JRE:
DOS Command
Ex: C:\>"C:\java\jdk1.6.0_21\bin\java.exe" -fullversion
Ex return: java full version "1.6.0_21-b07"
- Test your Environment Variable: Path
DOS Command
Ex: C:\>javadoc.exe -help (Note: javac.exe and not java.exe!)
Ex return: Help info for javadoc command.
(Note: If you get a error, go back up to the section where the Path
variable is set and follow those steps.)
- Test your Environment Variable: JAVA_HOME
DOS Command
Ex: C:\>%JAVA_HOME%\bin\javadoc.exe -help
Ex return: Help info for javadoc command.
(Note: If you get a error, go back up to the section where the Path
variable is set and follow those steps.)
- C:\java.exe - java.exe may come from several locations!
- Warning: Every time you install a JDK or JRE, the file
"java.exe" is over written (see notes below for the directory
location). Remember this when you are testing
different JRE versions.
- Win 7: C:\Windows\System32
- (files: java.exe, javaw.exe, javaws.exe)
- Legacy Windows OSs: "c:\winnt\java.exe" or "c:\windows\java.exe"
- Test the compiler:
DOS Command
Ex: "C:\java\jdk1.6.0_21\bin\javac.exe" -help
The above DOS command should display help for the compiler.
(Note: DOS gives the error: ... javac.exe is not a
valid Win32 application. If the bytes size = 0 then reinstall the JDK.
I would change the Users "Environment Variables" temp & tmp to "c:\temp".
Then click on the EXE again and choose the option to "Reinstall". (voice of experience!).)
Congratulations,
you have installed the JDK/SDK, JRE, and
Java Docs!
Uninstall Notes
Terminology
- Java SDK - compile code, run applications, create API's for your
code, etc...
- SDK - Software Development Kit. Any way you download a
SDK. After installation the directory will be called
"JDK1.3" etc...
- JDK - Java Development Kit - compile code, run applications,
crate API's for your code, etc...
Note: Version 1.1 was called JDK 1.1. (Next versions were called
J2SDK.)
- J2SE - Java 2 Standard Edition.
- J2EE - Java 2 Enterprise Edition
- J2SDK vx.x - Java
2 Software Development Kit - compile & run Java programs.
- J2RE vx.x -
Java 2 Runtime Environment - run java programs (you can't compile).
- Java API Docs - html files you can use to guide you through the Java classes.
API - Application Interface.
- JRE - Java Runtime Environment. The JRE v 1.2 and above also
includes the Java Plug-In. Use the JRE to run java applications. It is
the runtime part of the Java Development Kit, but without the development
tools such as compilers and debuggers. This is what your users will
use to run Java applications. You don't need it unless you want to
test what the users will be using.
- Java Plug-In: needed to run Java Applets that use Java
technology (versions) in which the browsers (IE, Netscape, etc...) have not
implement yet. You do not use the applet tags in this case. Use
the HTMLconverter to convert the applet tag to the appropriate object tag.
Miscellaneous Reference Information (Size of Files & Browser Compatibility)
- J2SE 1.6
Note: The JDK also contains the JRE.
JDK - jdk-6u21-windows-x64.exe - 68 MB
Docs -jdk-6u10-docs.zip - 58MB; jdk-6-doc.zip - 52.36 MB
- J2SE 1.5
Note: The JDK also contains the JRE.
JDK - jdk-1_5_0-windows-i586.exe - 45Meg
Docs - jdk-1_5_0-doc.zip - 45Meg
JRE -
jre-1_5_0-windows-i586.exe
Installs to:
- JDK 1.3.1_01 - c:\jdk1.3.1_01
- JDK 1.3.0 - All install to c:\jdk1.3
- J2SE 1.4
- J2SE 1.3
- JDK 1.3.1 33Meg, Doc's 22Meg, JRE 5.2Meg
(ex: SDK: j2sdk-1_3_1_01-win.exe, Docs: j2sdk-1_3_1-doc.zip, JRE:
j2re-1_3_1-win.exe)
- Browsers that support JDK 1.3
- As of 9/6/01 None - best support is Netscape 6
- J2SE 1.2.2_017 (released 12/4/98)
- J2SE 1.2.2: JDK ~21M, Doc's ~18M, JRE ~5.3M (Will not work on Win
NT 3.51)
- Browsers that support JDK 1.2
- JDK 1.1.8_010
- JDK ~9M, Doc's ~3.6M , JRE - ~2.7M
JDK - didn't include the docs. The docs was in a .zip file that
you extracted.
- Browsers that support JDK 1.1
- IE 4.x, 5.x
- NS 4.x
- HotJava 3.x
Download Managers - I suggest you get a program to help in downloading
large files. Even if you get knocked of the internet, it will resume again. I've
downloaded a 500 meg file before. They will normal be launched from your
browser.