EE417 Home‎ > ‎Downloads‎ > ‎

Installing JEE/JSE

Sun Microsystems (recently bought over by Oracle) have a somewhat confusing naming structure for the various versions of their software development kit for Java. The major versions have been:
  • JDK 1.0 (1996)
  • JDK 1.1 (1997)
  • J2SE 1.2 (1998) - this and subsequent releases through J2SE5.0 were re-branded Java 2
  • J2SE 1.3 (2000)
  • J2SE 1.4 (2002)
  • J2SE 5.0 (2004)
  • Java SE 6 (2006), Sun replaced the name 'J2SE' with Java SE
  • Java SE 7 (2011)
  • Java SE 8 (2014)
Simultaneously, we also have JEE (the Java Platform Enterprise Edition) which is a programming platform for creating and deploying Enterprise level, multi-tier, distributed applications.

In recent years, we used the JEE version, but actually have little need for this fully blown version now. In fact, the embedded 'Glassfish' server it bundles could cause us problems with clashing ports etc. and so we will just use the Standard Edition version.  Enterprise facets, such as Java Servlets and JSPs will be catered for by our separate installation of Tomcat.

In order to download the Edition, use the following link:At the time of this edit, the latest version is 'Java Platform, Standard Edition 7 SDK Update 3 (with JDK 6 U23)' . You should ensure that you download the JDK (Java Development Kit) as opposed to the JRE (Java Runtime Environment).  We are developing Java applications (rather than just running them) so will need the former.  You will be asked to agree to the Sun License and select your operating system version.  You should be careful on Windows to select the appropriate 32bit or 64bit selection.  It would also be beneficial to download the API documentation from the same link shown above. It is quite large, but will save you from having to connect to the internet when you wish to reference it while coding.

Installation Video

The following video demonstrates the installation of Java EE/SE on a Windows 7 machine.  The steps are similar for any other operating system (but it would be impossible to include them all here).  In each case, it involves installing the correct version and setting up your environment variables correctly.

Installation Notes

  1. The installer is very good - simply follow the steps involved. Choose a simple enough path (e.g. c:\Java\Java7) as you may have to type this quite often.
  2. In most versions of Windows, click the start button and type the word 'environment' into the text box and select the prompted option 'Edit the System Environment Variables'.  In Windows 2000/XP (go START->settings->control panel->system->advanced-> Environment Variables) and then modify your user environment variables.  
  • Set 'JAVA_HOME' to 'c:\Java\Java7'
  • Modify 'PATH' to include 'C:\Java\Java7\jdk\bin' (note that ; is used as the seperator)
  • Warning: If you open a command prompt, the result of typing 'javac -version' should give the same version as if you type 'java -version'.  If it does not then you will get errors when attempting to execute applications you compile. The most likely cause of this is a preexisting installation of Java on your machine.  The simplest solution is to make sure that the path to your Java 'bin' directory is listed in the PATH environment variable first (ie. on the left) before *any* other paths. Sometimes on Windows machines you will find an older version of Java in your 'Windows/System32' directory and this directory is by default listed in the PATH environment variable.  Hence, if when executing your applications you receive "UnsupportedClassVersionError: Bad Version" then you should make sure to list your path to 'C:\Java\Java7\jdk\bin' *before* the System32 directory is listed.  This is demonstrated in the video linked above.
  • The installation should also add a CLASSPATH environment variable. If you need to add packages to it at a later stage this is where you add them.  The benefit of this is that you won't have to constantly point at libraries when executing or compiling your code.  However, don't be concerned with this for the time being.
  • It is not permitted to mirror this software locally, so you will unfortunately have to download from one of Sun's Registered Mirrors.
Comments