Patrick --

Although it's not cross-platform, you could get the value of 'uname -m'. On my Gentoo P4 laptop, it's i686 whereas System.getProperty( "os.arch" ) gives i386. Same discrepancies for an Intel EM64T -- uname -m gives x86_64, os.arch is amd64. Then again, I'm using an IBM amd64 JVM on that machine.

My guess is the 64-bit Intel machine you're running on is using a 32-bit JVM. So, Java will only really return the architecture of the _JVM_, which isn't really the OS. Is a bit of a misnomer on Sun's part. Perhaps they should've called the system property jvm.arch.

Best of luck,
Tim Meals
Applications Developer

Marion, Patrick wrote:

Problem:
        have ant tell me whether I am running on a 64 bit architecture.

I thought the solution was:

        check for the value of the "os.arch" property.

Unfortunately, if I can make something out of the value returned on Windows
("amd64) I can't on Linux (it returns "i386" which is identical to the one
on a 32 bit machine); solaris sparc just returns "sparc".  The only os.*
properties which seem to be available to ant at start time seem to be:
"version", "name", and "arch".

Any suggestion on how to better handle this?
Thanks.
P.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to