5

Is there a way to find what architecture an ant script is running on? Currently I have the following:

<echo>System = ${os.name} ${os.arch}</echo> 

which produces:

[echo] System = Linux i386 

This not correct, as I am running 64 bit linux.

Thank you

1

3 Answers 3

6

Since Ant is running inside a JVM, it will only detect the architecture of the JVM. Run Ant with a 64-bit JVM and you'll get a different value of ${os.arch}.

If you want to detect the architecture of the underlying OS, you need to look at environment variables or check the output from something like uname.

Sign up to request clarification or add additional context in comments.

Comments

0

maybe Java's system property ${os.arch}. More information here.

Comments

0

Another solution:

<property environment="env"/> <condition property="systemWindows" value="64" else="86"> <available file="${env.windir}/SysWOW64"/> </condition> 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.