5.2 Installing JDK for JBoss

You must download and install Oracle JDK 6.0 update 31 or later updates to 6.0 versions from http://www.oracle.com/technetwork/java/javase/downloads/index.html

Create or set the JAVA_HOME environment variable to point to the location where the Java JDK is installed.

5.2.1 Set the JAVA_HOME environment variable (Windows)

  1. Select Start > Control Panel > System.

  2. Click the Advanced tab and click Environment Variables.

  3. In the New System Variable area, click New.

  4. In the New System Variable box, type JAVA_HOME as the variable name and enter the directory where you installed the Java JDK as the value. This directory contains the /bin subdirectory. For example, type the following path:

    C:\Program Files\Java\jdk1.6.0_31

5.2.2 Set the PATH environment variable (Windows)

  1. Select Start > Control Panel > System.

  2. Click the Advanced tab and click Environment Variables.

  3. In the System Variables area, select Path and click Edit.

  4. Add the following text at the beginning of the value:

    %JAVA_HOME%\bin;

5.2.3 Set the JAVA_HOME environment (Linux and Solaris)

  • It is recommended that you set the JAVA_HOME variable for Bourne and Bash as shown in the following example:

    JAVA_HOME=/usr/java 
    export JAVA_HOME

5.2.4 Set the PATH environment variable (Linux or Solaris)

  • It is recommended that you set the PATH variable for Bourne and Bash as shown in the following example:

    PATH=$JAVA_HOME/bin:$PATH 
    export PATH

5.2.5 (Windows, Linux, or Solaris) Verify your JAVA_HOME environment variable setting

(Optional) Open a command prompt and run the following command:

java -version

You should receive a response that begins with the Java version you have installed (for example, 1.6.0_31).

5.2.6 (Solaris) Modify the run.conf file

For JVM to run in 64-bit mode, add the -D64 JVM argument to the following line in the [appserver root]/bin/run.conf file.

JAVA_OPTS="$JAVA_OPTS -Xms1024m -Xmx2048m -XX:MaxPermSize=512m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Dsun.lang.ClassLoader.allowArraySyntax=true"

// Ethnio survey code removed