Sun GlassFish Enterprise Server v3 Prelude Administration Guide

ProcedureTo Switch a Domain to Another Supported Java Version

Enterprise Server v3 Prelude requires Version 5 Java SE platform as the underlying virtual machine for the JavaTM platform (Java Virtual Machine or JVMTM machine).

Note –

Do not downgrade to an earlier Java version after a domain has been created with a newer JVM machine. If you must downgrade your JVM machine, downgrade it only for individual domains.

  1. If you have not already done so, download the desired Java SDK (not the JRE) and install it on your system.

    The Java SDK can be downloaded from

  2. Start the domain for which you are changing the JDK.

    as-install/bin/asadmin start-domain domain-name

    For a valid JVM installation, the order in which locations are checked is as follows:

    1. domain.xml (java-home inside java-config)

    2. asenv.conf (setting AS_JAVA="path to java home")

    3. JAVA_HOME environmental variable

    4. system.getProperty ("java.home") + "../"

    5. system.getProperty ("java.home")

  3. If necessary, change the JVM machine attributes for the domain.

    In particular, you might need to change the JAVA_HOME environment variable. For example, to change the JAVA_HOME variable, type:

    as-install/bin/asadmin set ""