问题描述
我们已经继承了一个Ant构建文件,但现在需要部署到32位和64位系统。
We have inherited an ant build file but now need to deploy to both 32bit and 64bit systems.
非Java位完成与GNUMakefiles,我们只需要调用的uname来获取信息。是否有一个类似的或者更简单的方法与蚂蚁模仿呢?
The non-Java bits are done with GNUMakefiles where we just call "uname" to get the info. Is there a similar or even easier way to mimic this with ant?
推荐答案
您可以在Java系统属性得到(http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties())从蚂蚁$ {os.arch}。感兴趣的其他属性可能会os.name,os.version,sun.cpu.endian和sun.arch.data.model。
you can get at the java system properties (http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()) from ant with ${os.arch}. other properties of interest might be os.name, os.version, sun.cpu.endian, and sun.arch.data.model.
这篇关于如何确定构建架构(32位/ 64位)与蚂蚁?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!