我正在为其基本运行、清理和编译属性编写构建文件。这是我所拥有的:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project default="compile">
<description>
Compile and run the Java files for Lab7
</description>
<target name="prob1" depends='compile'>
<java classname='prob1'>
<classpath path='./'/>
<arg value='Gertrude'/>
<arg value='Justin'/>
</java>
</target>
<target name="prob2" depends='compile'>
<java classname='prob2'>
<classpath path='./'/>
<arg value='28'/>
</java>
</target>
<target name="prob3" depends='compile'>
<java classname='prob3'>
<classpath path='./'/>
<arg value='2000'/>
</java>
</target>
<target name="prob4" depends='compile'>
<java classname='prob4'>
<classpath path='./'/>
<arg value='2'/>
</java>
</target>
<target name="compile">
<javac srcdir='./' includeantruntime="false"/>
</target>
<target name="clean">
<delete>
<fileset dir="./">
<include name='*.class'/>
</fileset>
</delete>
</target>
</project>
我试图一次用不同的参数运行每个概率。就像在 prob1 中一样,我想用第一个名字运行它,然后用第二个名字再次运行它,我该怎么做?