Download & Install the JDK
(Free Web Tutorials & Resources)
by Michael Thomas
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)
If you don't have an Unzip program you may want to download a copy of my
favorite: WinZip. URL - www.winzip.com
(needed to unzip
the JDK Doc's)
Java 2 Product Family
JDK v1.3 (and other releases)
Summary of steps
-
Download the Java Products: SDK, DOC's, and JRE.
-
Install each of the products and test the install.
Download the Java Products
Download Links
- JDK 6 Update 6 (Version: 1.6.0_06-b02) - Current Download versions for Windows OS as of
06/10/08.
(FYI - this build '-b02' has a
problem that I hope will be corrected by Sun in the next several days.
When you get to the next yellow section below and get an error then follow
the work-around steps. I guess in the long run you will gain more
knowledge even though you will waste some time.)
You will be downloading the JDK, JRE, and DOC's. Click the "Download" tab at the top, then
click Java SE.
- Go to:
http://java.sun.com/j2se/
- Click the "Download" tab at the top.
You will be redirected to:
http://java.sun.com/javase/index.jsp
- 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 "JDK 6 Update 6".
Click the button "Download"
(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: There is other links for: Installation Instructions | ReadMe
| ReleaseNotes | Sun License | Third Party Licenses
- Click to accept the agreement.
- Download the following: (Example for XP etc...)
Platform: Windows Platform
Language: Multi-language
Check - I agree to the Java SE Development Kit 6 License Agreement.
Click "Continue"
- Select the following:
Windows Offline Installation
jdk-6u6-windows-i586-p.exe - 71.49MB
- Download options:
- HTTP Download of the exe - Just click the link for the name
of the download.
- Download Manager - Click the box, then click the button
called: "Download selected with Sun Download Manager".
Next, click "Open", then "Run". You will need to choose
the directory and then click "Start".
- Documentation Download:
Locate the section "Java SE 6 Documentation".
Click "Download"
- Click to accept the agreement
- Download the following:
Java SE 6 Documentation
Java(TM) SE Development Kit Documentation 6, English
jdk-6-doc.zip 52.36 MB
- Download options:
- HTTP Download of the exe - Just click the link for the name
of the download.
- Download Manager - Click the box, then click the button called:
"Download selected with Sun Download Manager". Next, click
"Open", then "Run". You will need to choose the directory
and then click "Start".
- 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 (ex section named: Java Runtime
Environment (JRE) 6 Update 6)
- Other Download Info
- Archive Download Versions:
http://java.sun.com/products/archive/index.html - Java Archives of
older versions.
- MAC Download Versions (OS Classic).
http://developer.apple.com/java/download.html
- MAC's only (OS Classic) - Sorry, I have no other instructions after this for
MAC users.
- At the above link, download the following products: (note-download
the latest version unless you are developing in an older version. You
may want to stay away from Beta versions.)
- For example of the file names that you will be downloading look at
the next section.
- Abbreviations:
JDK (Java Development Kit). This Kit will allow you to compile
.java files.
SDK (SoftwareDevelopment Kit)
SE (Standard Edition)
- DOC's - Java API documentation
- JRE - Java Runtime Environment (this allows the browser and/or Java
applications to run on your computer).
Install the SDK (JDK)
Install Notes for JDK 1.6
- Version JDK 1.6 Update 6 (Version: 1.6.0_06-b02)
- Install the JDK & JRE
File: jdk-6u6-windows-i586-p.exe - J2SE Development Kit
- Double click on the install file.
- Use all of the Defaults and click "Next" on every screen. The
JDK & JRE will be installed.
(Installed: Development Tools, Demos and Samples, Source Code,
Public JRE, Java DB)
Java DB - Apache Derby, 100% Java technology DB.
Does not require a reboot.
- Install Directory Information
- Windows
- JDK 1.6 - "C:\Program Files\Java\jdk1.6.0_06"
JRE 1.6 - "C:\Program
Files\Java\jre1.6.0_06"
- Readme File: C:\Program Files\Java\jdk1.6.0_06\README.html
- At the end of the install, you have an option to Register or
just close the window.
- Your Finished with the JDK install.
- Optional, but common:
- Add/Verify Environment Variables so other tools/apps can use
(like Ant, etc...)
- Go to the Environment Variable add/edit screen:
Win XPPro: Settings, Control Panel, System, Advanced tab,
click on "Environment Variable" button
- 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:\Program Files\Java\jdk1.6.0_06
(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)
- Additional Info
- The JDK EE (not SE) installs into a directory similar to:
C:\Sun\SDK
- The JDK EE (not SE) installs its EE docs (you still want the
SE docs) in the JDK EE install process to:
EE Docs -
C:\Sun\SDK\docs\about.html
- To test the JDK EE App Server install:
http://localhost:8080
(Warning: The home page does not look like Tomcat.)
- Install the Java Docs.
File: jdk-1-6-doc.zip
- Copy the .zip file to the root of the JDK install directory
(IE: C:\Program Files\Java\jdk1.6.0_06)
- 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.
- Your Finished with the Doc install.
- Additonal Info
- The EE (not SE) docs were install above with the JDK x EE
install (see notes above).
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:\Program Files\Java\jdk1.6.0_03\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\jre1.6.0_06\bin\java.exe" -fullversion
Ex return: java full version "1.6.0_06-b02"
(Note: Build "1.6.0_06-b02" has a
problem with the JRE install inside of the JDK. Gives "Access denied")
Hopefully this problem will be fixed in the next build !!!
To fix, uninstall the JDK and JRE (See the Uninstall notes towards the
bottom of this web page).
Download just the JRE and install. Then install the JDK and when
prompted to install the JRE say no.
- Test the JDK's JRE:
DOS Command
Ex: C:\>"C:\Program Files\Java\jdk1.6.0_06\bin\java.exe" -fullversion
Ex return: java full version "1.6.0_06-b02"
- Skip This Section !!!
Keeping for my notes for prior Java versions.
Note: "c:\winnt\java.exe" or "c:\windows\java.exe"
- FYI - this may have been loaded/updated and may point to your new
install.
Therefore the following may also work: c:\>java.exe -fullversion
- Warning: Every time you install a JDK or JRE, the file
"c:\winnt\java.exe" is over written. Remember this when you are testing
different JRE versions.
- Test the compiler:
DOS Command
Ex: "C:\Program Files\Java\jdk1.6.0_06\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"
before I installed the software again (voice of experience!).)
(Note: This is your Java compiler command. You may want to setup a DOS
path to: C:\Program Files\Java\jdk1.6.0_06\bin. More on this in the "Compile Your Frist
Program from DOS" section.)
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 - I'm not sure what this stands for. Maybe
"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-6u3-windows-i586-p.exe - 65.64 MB
Docs - 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.
FAQ about the Downloads
-
What is the JRE & Java-Plug-in?
If your developing applets for use within your company (intranet) that need
to have access to the latest releases of Java, you can point your code to
use a certain runtime environment instead of the browsers JVM. If you
use this feature on the internet, your uses would have to install the JRE on
there machine (not a good idea).
Here are some quotes from Sun.
-
"Java Plug-in software enables enterprise customers
to direct applets or JavaBeansTM on
their intranet web pages to run using Sun's Java 2 Runtime Environment,
Standard Edition (JRE) instead of the web browser's default virtual
machine. Sun's JRE provides a Java CompatibleTM
environment for today's widely adopted web browsers - that means
consistency and reliability when running applets. "
-
"Write Java 2 SDK v 1.3 software-based applets
today and deploy them to existing Netscape NavigatorTM
or Microsoft Internet Explorer users immediately!"