<project name="os" default="os" basedir=".">
<!-- check os -->
<target name="os">
<!-- if os is unix, the value of is.unix is true -->
<condition property="is.unix">
<os family="unix"/>
</condition>
<!-- if os is windows, the value of is.windows is true -->
<condition property="is.windows">
<os family="windows"/>
</condition>
<echo>
os.name=${os.name}
os.arch=${os.arch}
os.version=${os.version}
is.unix=${is.unix}
is.windows=${is.windows}
</echo>
</target>
</project>
<!-- check os -->
<target name="os">
<!-- if os is unix, the value of is.unix is true -->
<condition property="is.unix">
<os family="unix"/>
</condition>
<!-- if os is windows, the value of is.windows is true -->
<condition property="is.windows">
<os family="windows"/>
</condition>
<echo>
os.name=${os.name}
os.arch=${os.arch}
os.version=${os.version}
is.unix=${is.unix}
is.windows=${is.windows}
</echo>
</target>
</project>