ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 48664] New: Ant does not accept "-d64" option to run the underlying JVM as a 64-bit JVM.
Date Wed, 03 Feb 2010 11:16:37 GMT

           Summary: Ant does not accept "-d64" option to run the
                    underlying JVM as a 64-bit JVM.
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: AntUnit


I am using Ant version 1.7.1.

Normally on a 64-bit machine, you can run both a 32-bit JVM and a 64-bit JVM. 
I have a class that loads a native library on a 64-bit architecture machine,
and then uses it to do some processing. Hence, I want to load a 64-bit JVM.

Now the class builds and runs using ANT. I am not able to load that native
library using the ant command. Say I have a class, which loads
the native library. I can compile and run it as:

java -d64 TestLoader -Djava.library.path=<my_path>

Please note that:
java TestLoader        // This will load a 32-bit JVM.

Now, when I compile and run this class through ANT, I am not able to do so.
1. Ant does not recognize -d64 option; This is probably fine because you might
   want me to pass VM args using ANT_OPTS variable. Unfortunately that does not 
  work, too.

2. The ANT_OPTS variable also does not help in this case. 
   a) $> ant -DANT_OPTS="-d64" run
      This launches a 32 bit JVM. I used the "" system 
      property to verify that. 
   b) On solaris:
      $> setenv ANT_OPTS -d64; ant run
         This also launches a 32 bit JVM. I explicitly printed the system 
         property to check that.
   c) Surprisingly, on both of the above occasions, ant -diagnostics showed
      the system property as 64, which I guess is wrong.

Could you please take a look, and let me know if I am missing something. If
there is a way to pass -d64 option to ANT, or if there is any other work-around
which allows ANT to launch a 64-bit JVM underlying, I would be glad to know
about it.


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

View raw message