Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 22114 invoked from network); 3 Feb 2010 13:37:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Feb 2010 13:37:42 -0000 Received: (qmail 87720 invoked by uid 500); 3 Feb 2010 13:37:42 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 87666 invoked by uid 500); 3 Feb 2010 13:37:41 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 87657 invoked by uid 99); 3 Feb 2010 13:37:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 13:37:41 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Feb 2010 13:37:41 +0000 Received: by brutus.apache.org (Postfix, from userid 33) id C129D234C1F0; Wed, 3 Feb 2010 05:37:20 -0800 (PST) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 48664] Ant does not accept "-d64" option to run the underlying JVM as a 64-bit JVM. X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: AntUnit X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sharmah@deshaw.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Message-Id: <20100203133720.C129D234C1F0@brutus.apache.org> Date: Wed, 3 Feb 2010 05:37:20 -0800 (PST) https://issues.apache.org/bugzilla/show_bug.cgi?id=48664 --- Comment #2 from sharmah 2010-02-03 05:37:19 UTC --- Thanks for the reply Antoine. The output with a --execdebug flag shows that -d64 option is indeed added to the ANT command, but still the JVM launched is 32 bit. Where-as when I pass the same option directly to the "java" command it shows that the JVM launched is 64 bit. Best Regards, Himanshu --execdebug output: Please note in this that the -d64 option is added properly, but the value of "sun.arch.data.model" property remains 32. But, this property expectedly changes to 64, when we use "java -d64" ====== $> ant --execdebug exec "/usr/local/java/jdk/bin/java" -d64 -classpath "/prod/tools/infra/apache/ant-1.7.1/lib/ant-launcher.jar" -Dant.home="/prod/tools/infra/apache/ant-1.7.1" -Dant.library.dir="/prod/tools/infra/apache/ant-1.7.1/lib" org.apache.tools.ant.launch.Launcher -cp "" Buildfile: build.xml compile: run: [java] Value of sun.arch.data.model is 32 BUILD SUCCESSFUL Total time: 0 seconds ======= Here is an illustration of the original problem: ======== $> cat TestProperties.java // Sample java class to test the architecture of the launched JVM. import java.util.Properties; public class TestProperties { public static void main(String[] args) { String testProp = "sun.arch.data.model"; System.out.println("Value of " + testProp + " is " + System.getProperty(testProp)); } } ======== // A sample ant build.xml file, so that we can compile/run // the above test class $> cat build.xml using ANT. ======== When I run the class directly using the java command it tells me whether it is running a 32bit JVM or a 64 bit JVM. $> javac TestProperties.java $> java TestProperties Value of sun.arch.data.model is 32 // The launched JVM is 32-bit, which is the default behavior. $> java -d64 TestProperties Value of sun.arch.data.model is 64 // The launched JVM is 64-bit. $> \rm TestProperties.class // Remove that .class file that we compiled manually. Now using ANT, I am not able to reproduce the same: A) $> ant run Buildfile: build.xml compile: run: [java] Value of sun.arch.data.model is 32 // The launched VM is 32 bit, as expected BUILD SUCCESSFUL Total time: 0 seconds $> B) It does not directly accept the -d64 option. C) $> ant -DANT_OPTS="-d64" run ant -DANT_OPTS="-d64" run Buildfile: build.xml compile: run: [java] Value of sun.arch.data.model is 32 // The launched VM is still 32bit. BUILD SUCCESSFUL Total time: 0 seconds D) $> setenv ANT_OPTS "-d64" $> ant run Buildfile: build.xml compile: run: [java] Value of sun.arch.data.model is 32 // The launched VM is still 32bit. BUILD SUCCESSFUL Total time: 0 seconds -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.