1834051 Members
2354 Online
110063 Solutions
New Discussion

32bits or 64bits ?

 
SOLVED
Go to solution
Sébastien N
Advisor

32bits or 64bits ?

Hi,

How to know if a running program is built in a 32 or in a 64 bits mode (my JVM) ?

Thanx.
15 REPLIES 15
Robert-Jan Goossens
Honored Contributor
Solution

Re: 32bits or 64bits ?

Hi,

Use file,

/usr/local/bin# file lsof
lsof: ELF-64 executable object file - PA-RISC 2.0 (LP64)

Robert-Jan.
twang
Honored Contributor

Re: 32bits or 64bits ?

A running program?? I think you can find out if the executable support 64bit by issuing:
# file

Sébastien N
Advisor

Re: 32bits or 64bits ?

Thanx, but it doesn't work :
file /jdk131/bin/java
/jdk131/bin/java: commands text

?
Robert Gamble
Respected Contributor

Re: 32bits or 64bits ?

S???stien N,

If the 'file' command returns 'commands text', then it is a shell script (or config file) and not a compiled program. A shell script is readable, and you could determine if it it checks for 32 or 64 bit before running a(probable) binary.

Hope this helps!
twang
Honored Contributor

Re: 32bits or 64bits ?

open the java file to find out which executable invoking:
for example, you should find a 'prog=$JAVA_HOME/bin/PA_RISC/${THREADS_TYPE}/${progname}' statement.
Try to check the $program
Sébastien N
Advisor

Re: 32bits or 64bits ?

You are right : java is a shell file.

So I tried :
file /jdk131/bin/PA_RISC2.0/native_threads/java

and the answer :
/jdk131/bin/PA_RISC2.0/native_threads/java: PA-RISC2.0 executable dynamically linked -not stripped

What does that mean (32 or 64bits) ?
Stefan Farrelly
Honored Contributor

Re: 32bits or 64bits ?

PA-RISC 2.0 is only 32 bit binary.

To be 64bit it must say;

ELF-64 executable object file - PA-RISC 2.0 (LP64)

(ie. its got to say ELF-64 as well as PA-RISC 2.0)
Im from Palmerston North, New Zealand, but somehow ended up in London...
twang
Honored Contributor

Re: 32bits or 64bits ?

It is a 32-bit executable.
Sébastien N
Advisor

Re: 32bits or 64bits ?

Thanx everybody.

Do you know where download JDK 1.3.1 for HP-UX 11i (64bits) ?
James R. Ferguson
Acclaimed Contributor

Re: 32bits or 64bits ?

HI:

See here for JDK downloads:

http://www.hp.com/products1/unix/java/

Regards!

...JRF...
Umapathy S
Honored Contributor

Re: 32bits or 64bits ?

Here it is
http://www.hp.com/products1/unix/java/java2/sdkrte1_3/index.html

HTH,
Umapathy


Arise Awake and Stop NOT till the goal is Reached!
Stefan Farrelly
Honored Contributor

Re: 32bits or 64bits ?

None of the HP SDK or RTE Java kits come with 64bit binaries for Java. I dont think HP do them for PA-RISC.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Sébastien N
Advisor

Re: 32bits or 64bits ?

64bits only available with SDK 1.4 :-(

Thanx.
Stefan Farrelly
Honored Contributor

Re: 32bits or 64bits ?

Were running the latest Java SDK (1.4.1.03) and the java binaries are all compiled as PA-RISC 1.1 (32bit). There are no 64bit binaries for PA-RISC (not in /opt/java/1.4/bin).
Im from Palmerston North, New Zealand, but somehow ended up in London...
Mike Stroyan
Honored Contributor

Re: 32bits or 64bits ?

Stephan,

Look in /opt/java1.4/bin/PA_RISC2.0W/java and
/opt/java1.4/jre/bin/PA_RISC2.0W/java for the 64-bit executeables.