JDK : Java Glossary

go to home page J words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 2009-05-28 Roedy Green, Canadian Mind Products
jdk duke logo JDK
Sun’s Java Development Kit. Formerly foppishly called the SDK Software Development Kit. It is free, and you may freely distribute any programs you create with it.
The JDK, described here, is for people who want to write their own Java programs. If all you want to do is run them, or browse Applets on the web, you should use the much smaller JRE instead. You don’t need both. The JDK includes the JRE.
Further, to confuse everyone, Sun’s marketing people refer to all Java versions 1.2+ as Java 2 and 1.5+ versions as Java 5. The JDK consists of a Java compiler, written in Java, and a run time interpreter for your particular platform. You compose programs using a traditional text editor or an IDE. The term JDK also refers generally to the set of Sun-supplied classes including the AWT. Apple calls the JDK the MRJ. You cannot distribute the JDK with your program. You must distribute the stripped down JRE instead.

To further confuse you, Sun refers to the various downloads of Java updates. They are not updates, but entire new versions. You don’t need a previous version installed.

Downloading the JDK Retrofitting
Testing The JDK JDK Differences
Installing in Linux Multiple JDKs
Contents of the JDK Upgrading Your JDK to a New Version
Why Three Copies? JDK Release Dates
Caveats Links
Failed Installs

Downloading the JDK

For Vista, make sure you are logged in as an administrator before you install. The install will work more smoothly if you launch the install of the download with “run as administrator”. Some suggest it is best also to turn on UAC (that irritating Visa User Account control) during the install. If you have troubles downloading, turn off any sort of virus checker temporarily. The downloads are labeled as updates, but they are complete in themselves. You don’t need to install a previous version.

Below is how to get Java for Windows, Linux and Solaris. For other platforms (e.g. various Unices) see your OS vendor’s site. For example for NetBSD Unix Java is included in pkgsrc (the Packages System).

Version Executables Documentation What’s New
JDK 1.6.0_17
(current)
download JDK 6 Update 17 73.55 mb self-installing executable. Select JDK 6 Update 17 then your platform and choose Windows (or whatever your platform. Windows 7 is Windows 64 bit)
jdk-6u17-windows-i586.exe
This is most likely the version you want to download. The JDK, described here, is for people who want to write their own Java programs. If all you want to do is run them, or browse Applets on the web, you should use the much smaller JRE instead. You don’t need both. The JDK includes the JRE.

The Sun uninstaller is badly designed. Watch out for the following:

  • You must set the drive of the JDK and Derby SQL separately. You must click the various options to access the boxes to fill in the install directories.
  • There are two JREs. The installer asks you about the one embedded in the JDK, and only at the last minute asks you about the separate one usually installed on C:.
  • The installer won’t set up the PATH and JAVA_HOME environment variables for you.
  • The installer won’t set up the associations for *.jar and *.jnlp for you.
download documentation jdk-6u10-docs.zip 56.16 MB in zipped HTML format.
1.6.0_17 requires updated documentation, unusual for a minor version release.
The link in is the middle of the page after the JDK and JRE downloads before the source downloads. Only the very curious want the source downloads. You just unzip the download into your J:\Program Files\java\jdk1.6.0_17 directory with folder names. There is no installer. I suggest you mark the docs directory as compressed to save space after you download and unzip it.

It will install a JDK in: J:\Program Files\java\jdk1.6.0_17 and a client JRE in: C:\Program Files\java\jre6 and a debugging/server JRE in: J:\Program Files\java\jdk1.6.0_17\jre. The documentation goes in: J:\Program Files\java\jdk1.6.0_17\docs

After you have installed the documentation, build a bookmark to it in your browser:

Sun’s documentation on JDK : available:
release notes. To use any of the new features you must compile with
rem compiling with JDK 1.6 features turned on
javac.exe -source 1.6 -target 1.6 MyProg.java
You might consider renaming src.zip to src.jar so that your IDE can see the source files for cross referencing.

New features in JDK 1.6:

  • Nimbus look and feel
  • various features for quicker starting, which are disabled in Vista.
  • hardware accelerated video
  • more ablilty to configure Applets

The install also puts some files in C:\Program Files\java\common files.

It will install two copies of the JRE, a private one with debugging turned on in J:\Program Files\java\jdk1.6.0_17\jre for the SDK tools, and a public one with debugging turned off in C:\Program Files\java\jre6 for all apps to use. The private debugging version is designed for tracing code through step by step.

You can also download source the source for everything. You don’t need it other than for curiosity.

JET Version 6.5 supports up to Java 1.6.0_12. (The most recent Sun release is 1.6.0_17) or 1.5.0_22 Last revised/verified: 2009-11-03. JET supports Linux and Windows including Vista. JET comes with a precompiled JRE, so you don’t actually need to install a Sun 1.6.0_12 JRE though obviously you will need some JDK for development, usually JDK 1.6.0_17. Jet Beta 7.2 lets you natively compile Tomcat in either Windows or Linux.

Java 1.5.0_22 SDK/JDK (old) download JDK The Windows Installation version is 88 MB and contains NetBeans. If you don’t want NetBeans, look lower on the page under 32-bit/64-bit for Windows/Linux/Solaris SPARC 32-bit for Solaris x86 where you can get the vanilla 55 MB JDK. You then get a choice of online or off-line install. off-line is preferable since it lets you reinstall later even if you have no Internet access or if Sun stops making it available. online uses less disk space since it downloads as needed during the install. You can also put the off-line version on CD for backup or to pass on to others. JDK version 1.5 is slated for end of life 2009-10-30, last updated on 2009-11-03. The JDK includes source in src.zip and class files in jre\lib\rt.jar. Includes the JRE and Java Web Start runtime jawaws.exe. Does not include JavaMail or JAF. download documentation 49 MB in zipped HTML format. The link is way at the bottom of the page after the JDK executable downloads. I suggest you mark the docs directory as compressed to save space after you download and unzip it. . release notes. You might consider renaming src.zip to src.jar so that your IDE can see the source files for cross referencing. This release includes major changes to the Java language such as boxing/unboxing (automatic int <-> Integer conversion), generic (Collections know what sort of objects are in them), enhanced for loops for iterating over Collections, and typesafe enumerations, and variable numbers of argument to a method. Here is a summary of the changes
Mac OS X
JDK 1.6.0_13
download executables documentation Java for Mac OS X. If you can find better URLs let me know. Apple’s site is chaotic. Mac’s ship with JDK 1.4.2. You must download 1.6.0_13 separately. release notes.
Mac OS
JDK 1.1.8
MRJ 2.2.5
download executables download documentation Java for the classic Mac OS. If you can find better URLs let me know. Apple’s site is chaotic.
Mac OS
MRJ 2.2
download presumably bundled with the executables. Java for the classic Mac OS. If you can find better URLs let me know. Apple’s site is chaotic. Available as *.dmg, *.bin and *.hqx formats. MacOS for the PowerPC is stuck at version 1.5. Intel Macs support version 1.6.

Polishing and Testing The JDK Install

  1. Configure your set environment for the CLASSPATH. If you are not sure use CLASSPATH=. See environment for details of how. See classpath for details.
  2. Configure environment variable JAVA_HOME=J:\Program Files\java\jdk1.6.0_17 to point to the JDK.
  3. Configure environment variable PATH to include the JDK binaries directory J:\Program Files\java\jdk1.6.0_17/bin This ensures that javac.exe is on the path. See path for details.
  4. Set your JAVA_HOME environment variable to the JDK directory e.g. J:\Program Files\java\jdk1.6.0_17. Some software such as Caucho Resin finds Java using this variable rather than poking around in the registry. See environment for details on how to set it.
  5. If you use Jikes, set up your JIKESPATH environment variable to include the JRE’s rt.jar with .;C:\;C:\Program Files\java\jre6\lib\rt.jar See environment for details on how to set it.
  6. Copy your various library jars into the J:\Program Files\java\jdk1.6.0_17\jre\lib\ext directory.Sooner or later you will have to reinstall the JDK/JRE and you will lose your ext directories. You can quickly rebuild them if you maintain a bat file like this and run it after every JRE/JDK install. Adjust the file to account for where your ext dirs are and where the jars are you need.
  7. Set up your J: drive to point to the drive where you installed the JDK. For detailed instructions see J: drive.
  8. The JDK contains a JRE. Test the JRE the same way you would had you downloaded a standalone JRE.
  9. Type java.exe -version. You should see Java version 1.6.0_17.
  10. Type javac.exe -version. You should see javac 1.6.0_17.
  11. Compile and run a HelloWorld application.
  12. If you can’t get it to work, follow the failed install instructions.

Installing under Linux

Installing a JDK/JRE under Linux is much more complicated that under Windows. You need to perform half a dozen manual installation steps. You also need to set up a soft link from each of your browser plug-ins to the corresponding Java *.so libraries. Download and study the install instructions. You will never guess them. Consult your browser for documentation on the soft links.

To access the JDK under Linux, you need to set up two environment variables JAVA_HOME and the PATH.

export JAVA_HOME=/usr/local/jdk1.6.0_17
PATH=${JAVA_HOME}/bin:${PATH}
You are probably best off to leave the CLASSPATH alone. Use jars, or specify it as needed on the java.exe command line.

Contents of The JDK

Once you have the JDK installed what do you get?

Why Three Copies of the Executables?

Why does Sun give you three copies of the executables such as java.exe?
  1. The C:\Program Files\java\jre6\bin version is for ordinary production client use.
  2. The J:\Program Files\java\jdk1.6.0_17\jre\bin version is for production servers. The java.exe there understands the -server option.
  3. The J:\Program Files\java\jdk1.6.0_17\bin version is for debugging.
In practice, most of the files are identical. You normally just put the J:\Program Files\java\jdk1.6.0_17\bin version on your path when developing and you get everything you need, including javac.exe, with maximal help in tracking problems.

For client use, you don’t need to put anything on the path. The JRE installer puts a dummy copy of java.exe on the path in C:\WINNT\system32 to get things started. When it is invoked, it looks in the registry to find the current actual java.exe. javaws.exe works the same way.

Caveats

Failed Installs

If a JDK (or JRE) fails to behave normally, try this:
  1. Check that the JDK/JRE download is the expected size. The download may have aborted.
  2. For Java Applets to work in a browser, there must be a copy of msvcr71.dll in the C:\windows\system32 folder. If there isn’t, copy it from C:\Program Files\java\jre6\bin.
  3. Make sure that the anti-spyware program Webroot SpySweeper, is turned off. It will interfere with installs.
  4. Make sure no copies of any of the Java utilities are running. Use the task manager to kill any that won’t quit normally.
  5. Uninstall all Java JDKs and JREs with Start ⇒ Settings Control Panel ⇒ add/remove programs.
  6. Reboot.
  7. Manually delete any remaining files in the C:\Program Files\java\jre6, J:\Program Files\java\jdk1.6.0_17 and C:\Users\userid\AppData\LocalLow\Sun directories. Make sure there are no copies of java.exe, jawaws.exe, jawaw.exe or javac.exe anywhere on your machine including C:\Windows\System32.
  8. Manually delete any *.msi files for Java buried in the C:\Windows tree. Click search ⇒ Files and Folders ⇒ *.msi to track them down.
  9. Go into the registry with regedit.exe and delete all reference to the Java installation i.e. HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft. If you are not sure, leave the entry alone.
  10. Delete all the files in C:\Documents and Settings\userId\Application Data\Sun\Java or your equivalent, such as C:\Users\userId\AppData\LocalLow\Sun, C:\Users\userId\AppData\Roaming\Sun and C:\Windows\Sun. You might have to use the Unlocker utility to kill the directories.
  11. Run a registry cleaner such as Ace to get rid of any registry references to the deleted files.
  12. Reboot.
  13. Reinstall, including setting up the set JAVA_HOME, set CLASSPATH, set PATH environment, and the ext directory.
  14. Sometimes uninstall, install to a different directory, uninstall, install to the original directory will clear it.
  15. If Java runs standalone, but does not work in your browser, test your JRE browser hooks by running Wassup. It should tell you that your browser is using the JVM version you just installed. Look for the line marked java.version. If Wassup does not run, or you have the wrong version, go into Start ⇒ Settings Control Panel ⇒ Java Plug-In ⇒ Browser and turn off each browser, then click apply, then turn them on again, then hit apply again. Then retest with Wassup.
  16. Have a look at the hidden Java Web Start control file C:\Documents and Settings\administrator\Application Data\Java\Deployment\deployment.properties. Don’t edit it. If you see something wonky (e.g. references to an uninstalled JVM), go into the Control Panel ⇒ Java Control Panel and turn things off and on again and hit apply to refresh the file. If that does not work, make a backup and try deleting the deployment.properties file, then try going into the Java Control Panel and clicking reset. The set everything up from scratch. If that does not work try editing a copy of the original deployment.properties file, sorting the entries first to make it clearer what they do, and installing it back as the official deployment.properties.

Retrofitting

You can download some of the JDK 1.2 features and retrofit them into JDK 1.1. These include:
  1. Swing
  2. IBM’s JDK 1.2 security classes.
  3. Collection classes (except the natural order stuff).
  4. Help engine.
Why would you do such a goofy thing rather than just upgrading? Microsoft’s IE 5 is stuck at Java 1.1.5. Either you must upgrade your customers to IE 6 and Java 1.4, or somehow make all your code work at the 1.1.5 level. Thankfully IE 5 has all but disappeared.

JDK Differences

Java is compatible between versions. Old code will run, even without recompilation, on new JVMs, and new code, so long it avoids new features, and you compile with the -target option, will run on old JVMs,
Java JDK Major Releases and Released Differences
Date Version Codename New Features Introduced In that Release
1996-01-23 1.0 Oak? Java released to public
1997-02-18 1.1 Sparkler No longer supported. Added a totally new event model, using Listeners, anonymous classes and inner classes. This is the level Microsoft has trapped many of its customers at. Netscape proprietary RSA code signing. Microsoft proprietary CAB code signing.
1998-12-04 1.2 Playground No longer supported. Added ArrayList and other Collections, added Swing (though the initial release is missing many methods). Added DSA code signing. Added BufferedImage
2000-05-08 1.3 Kestrel No longer supported. java.util.Timer, java.lang. StrictMath, Runtime. addShutdownHook, java.awt. Robot, java.awt.print. PageAttributes, java.media.sound (MIDI and sampled). Hotspot introduced. RMI now has the option of using CORBA’s IIOP protocol. Added RSA code signing, which quickly effectively obsoleted DSA certificates.
2002-02-13 1.4 Merlin No longer supported. added regexes, assertions and nio.
2004-09-29 1.5 Tiger added StringBuilder, java.util.concurrent, generics, enums, annotations, autoboxing, covariant return types, for:each, static import and variable-length argument lists. MacOS for the PowerPC is stuck at version 1.5. more.
2006-12-12 1.6 Mustang System tray, subpixel antialiasing, Document-modal, Application-modal, Toolkit-modal, Applet splash screens, table sorting, true double buffering, digitally signed XML files, JWS support for *.ico and *.png, JavaCompiler, JDBC 4.0, smart card API, Console. readPassword, improved drag & drop. Apple OS X 10.5 supports JDK 1.6.0_13. more.
not released 1.7 Dolphin There is still on-going discussion on what should be included.

Upgrading Your JDK to a New Version

  1. Download and install the new JDK.
  2. Check your set environment for outdated references, e.g. JAVA_HOME, classpath, path.
  3. Update any *.bat files that point to the old JDK/JRE to point them to the new JDK/JRE.
  4. Copy your various auxiliary jars into the ext directory. See ext directory for details.
  5. Reconfigure the compiler used in your various IDE project settings, update library includes, e.g. tools.jar and recompile everything.
  6. Move the doc documentation from your old JDK to the new one
  7. Check that the association for *.jnlp is set up to point to the new javaws.exe in both Windows and your browser. See installing Java Web Start for details.
  8. If you use SlickEdit, copy src.zip to scr.jar and reindex it.
  9. If that does not work, uninstall all JDKs and JREs. Then manually remove any vestigial directories. And start over.
  10. If that does not work, clean out the Java registry entries and all the JDKs and JREs and start over.

CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/jdk.html J:\mindprod\jgloss\jdk.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.106]
You are visitor number 320,469.