Skip to main content

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

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
5 replies [Last post]
tale103108
Offline
Joined: 2012-06-27

CentOS Linux 5.8
Glassfish 3.0.1
===============

For version 3.0.1 of Glassfish, how do I determine if Glassfish is running in 64-bit mode? For that matter, how do I know that I have a 64-bit version of Glassfish installed?
If running in 32-bit mode and I have a 64-bit Glassfish installed, how to configure Glassfish to run in 64-bit mode?

Ditto for version 3.1.2 of Glassfish.

Thanks in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tmueller
Offline
Joined: 2005-10-31

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

emailnbw
Offline
Joined: 2008-05-28

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 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
>

al130959
Offline
Joined: 2005-09-28

One more possibility is to remotely connect to the actually running
Glassfish JVM using jvisualvm and then select the appropriate Glassfish
JVM process id and have a look at the JVM properties shown at the
jvisualvm main page.

BR,
Andreas

Am 12.12.2012 19:52, schrieb Noah White:
> 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 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
>>

--
Oracle
Andreas Loew | Senior Java Architect
ACS Principal Service Delivery Engineer
Phone: +49 6103 397 597 | Fax: +49 6103 397
499 | Mobile: +49 172 8126863

Oracle Advanced Customer Services

ORACLE Deutschland B.V. & Co. KG | Robert-Bosch-Straße 5 | D-63303 Dreieich

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstraße 25 | D-80992 München
Registergericht: Amtsgericht München, HRA 95603
Geschäftsführer: Jürgen Kunz

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167 | NL-3543 AS Utrecht | Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher

Green Oracle Oracle is committed to
developing practices and products that help protect the environment

tale103108
Offline
Joined: 2012-06-27

Makes sense .. thanks! :-)

tale103108
Offline
Joined: 2012-06-27

Makes sense .. thanks! :-)