users@glassfish.java.net

Re: How to determine if Glassfish on Linux is running in 64-bit mode?

From: Noah White <emailnbw_at_gmail.com>
Date: Wed, 12 Dec 2012 13:52:45 -0500

True. Normally its that simple. However, things can be a little more subtle. In the case of determining this for Glassfish on Linux some things to keep in mind are:

1) Is GF being started w/an RC script? If so then you want to verify the java version being picked up by the RC scripts environment. It might be running in an environment which picks up a different java version then the one you get when you simply run java -version from your cmd line.

2) Check / verify the Java being picked up by GF's own scripts. They might have been edited to pick up a specific version of GF regardless of the environment (rc script or shell) that invokes them. In particular look in:

        $GF_HOME/bin/asadmin
        $GF_HOME/glassfish/config/asenv.conf (refer to the comments in this file regarding AS_JAVA)
        $GF_HOME/glassfish/bin/asadmin
        $GF_HOME/glassfish/bin/startserv

-Noah

On Dec 12, 2012, at 10:24 AM, Tom Mueller <tom.mueller_at_oracle.com> wrote:

> GlassFish is a 100% Java application, so the code doesn't have a notion of 32-bit vs. 64-bit.
> How it runs is determined by the JVM it is running on. You can see the version of
> your JVM by running "java -version". For example, on my system it says:
>
> $ java -version
> java version "1.7.0_09"
> Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
> Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
>
> So GlassFish will run in 64-bit mode if running on this JVM.
>
> Tom
>