The Java Virtual Machine (JVM) allows our enterprise application, application server and IDE, to run. Sun Microsystems provides JVMs for Linux, Solaris and Windows operating systems.
There are two principal products in the Java SE family: Java SE Development Kit (JDK) and Java SE Runtime Environment (JRE).
The JRE provides the Java APIs, Java Virtual Machine (HotSpot VM), and other components necessary to run applets and applications written in the Java programming language. It can be redistributed with such applications.
The JDK contains everything that is in the JRE, plus tools such as the compilers and debuggers necessary for developing applets and applications.
It is important to note that the JDK is to be downloaded, the JRE should NOT be downloaded. The JRE does NOT contain the compiler, which Eclipse and JBoss require.
Download JDK 5.0 from http://java.sun.com/javase/downloads/index.jsp to some temporary folder (C:\temp).
Run the JDK 5.0 installation program by running the following file:
Read and accept the license agreement.
Accept the default destination directory.
Set the JAVA_HOME Environment Variable
The environment variable called JAVA_HOME is used by many Java applications, including JBoss. It is therefore necessary to make sure that this environment variable is setup correctly after Java has been installed.
On Windows Systems, in the control panel, the System icon is opened. The Advanced Tab is selected, and the Environment Variables button is pressed.
Click the New button in the User variables section. Add the new variable called JAVA_HOME, its value is the root installation of the Java SDK (C:\Program Files\Java\jdk1.5.0_09):
Update the PATH Environment Variable
Open the Environment Variables dialog and select the PATH variable in the User variables section.
Click the Edit button.
Update variable to point to the binary folder of JDK just installed (C:\Program Files\Java\jdk1.5.0_09\bin):
Verify the JAVA_HOME environment variable:
C:\>set JAVA_HOME JAVA_HOME=C:\Program Files\Java\jdk1.5.0_09
Verify the PATH environment variable:
C:\>java -version java version "1.5.0_09" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b01) Java HotSpot(TM) Client VM (build 1.5.0_09-b01, mixed mode, sharing)