Installation fails on 64–bit systems that have 64–bit JDK because the installer tries to use the 64–bit JDK.
If you are installing Sun GlassFish Enterprise Server on a 64–bit system, download the 32–bit JDK and use it to install Sun GlassFish Enterprise Server on your 64–bit machine. You will need to use the following command: ./distribution_filename —javahome path to 32–bit JDK location
After installation, to ensure that Sun GlassFish Enterprise Server uses a 64–bit JDK, edit the value of the AS_JAVA variable in the asenv.conf file to point to the 64–bit JDK installation.