Enterprise Java Development@TOPIC@
You will need a copy of either Java 6 or Java 7 SDK installed. JavaEE 6 only requires JDK 6 but but JDK 6 will soon hit its end-of-life. The instructions describe downloading JDK 7.
The Maven configuration for class will default to Java 6-compliant source while targeting a Java 7 runtime. This should give us a decent fallback option between the two versions during this transition period. To use a Java 6 runtime, simply override the default "java.target.version=1.7" property using your Maven .m2/settings.xml.
Keep the 32/64-bit choice consistent with what you download later for Eclipse.
Linux Users: The alternate JDKs (e.g., OpenJDK) available from your package manager will work fine for class.
Windows Users: Install the Java 7 JDK from Sun/Oracle
Download a copy of the Java 7 JDK http://www.oracle.com/technetwork/java/javase/downloads/index.html . Choose Java SE 7 Update (latest) JDK. We will only be using the JDK portion in class so avoid the alternate downloads that add in the Glassfish JavaEE Application Server and NetBeans. We will be using JBoss and Eclipse.
Install the JDK and associated JRE in a directory that does not have spaces in its path.
The Oracle Windows JDK installer will attempt to place the JDK and JRE in a directory with spaces. Be sure to override the installer defaults when it prompts you for installation directory.
Define an environment variable JAVA_HOME to reference the JDK
Add JAVA_HOME/bin to your PATH if necessary
Depending on how you performed the installation, you may need to add the JDK to your PATH
Figure 1.1. Fedora Example
$ java -version java version "1.7.0_25" OpenJDK Runtime Environment (fedora-2.3.10.3.fc17-x86_64) OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode) $ javac -version javac 1.7.0_25
Figure 1.2. Windows XP Example (TODO:update])
> java -version java version "1.7.0_11" Java(TM) SE Runtime Environment (build 1.7.0_11-b21) Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode, sharing) >javac -version javac 1.7.0_11