On Monday October 17, 2005 01:26 pm, "Marion, Patrick"
<[EMAIL PROTECTED]> wrote:
> Thank you all for your suggestions. Indeed I cannot rely on the
> JVM currently running to tell me whether the machine architecture
> itself is 64bit, since a 32bit JVM can run on a 64Bit machine.
Ahhh, I was mistaken. I had though you needed to know if the VM itself
was 32- or 64-bit, not the underlying chip.
In this case, I don't think there is much you can do from the Java
side unless you hardcode a lot of machine specific tests. Or perhaps
a tiny little bit of native code. However, this too has it's problems
as you can never be sure if you are running on a 32-bit chip or a
32-bit program on a 64-bit chip. Even something like
perl -e 'use Config; print $Config{longsize}';
can give misleading results on a 64-bit chip when run with a 32-bit
version of Perl. As you have noticed with JVM's.
About the best you can say for sure is that if "sun.arch.data.model"
is 64 then you are running on a 64-bit chip, otherwise you may be on
a 32- or 64-bit chip.
> I am running Ant 1.6.2; could it be that more recent versions
> handle this?
I don't think this would be something that Ant would support (even in
the newest versions). It's just too machine and chip specific.
Sorry I don't have any better suggestions for you.
- Rob
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]