On Thursday October 13, 2005 08:06 pm, "Marion, Patrick"
<[EMAIL PROTECTED]> 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".
If you are running a Sun (or IBM, I believe) 1.4+ VM. You can check
the system property "sun.arch.data.model". This will be "32" for a 32
bit VM and "64" for a 64 bit VM.
For earlier versions of the above JVMs, you could reasonably assume
that they are 32-bit.
However, that still means that you have to figure what to do for other
VMs and platforms.
- Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]