< prev index next >

src/demo/share/java2d/J2DBench/build.xml

Print this page
@@ -37,35 +37,58 @@
    <property name="src" location="src"/>
    <property name="build" location="build"/>
    <property name="dist"  location="dist"/>
    <property name="resources"  location="resources"/>
  
+   <condition property="source" value="7">
+      <not>
+         <isset property="source"/>
+      </not>
+   </condition>
+   <condition property="target" value="7">
+      <not>
+         <isset property="target"/>
+      </not>
+   </condition>
+   <condition property="java" value="java">
+      <not>
+         <isset property="java"/>
+      </not>
+   </condition>
+   <condition property="javac" value="javac">
+      <not>
+         <isset property="javac"/>
+      </not>
+   </condition>
+ 
    <target name="init">
      <!-- Create the time stamp -->
      <tstamp/>
      <!-- Create the build directory structure used by compile -->
      <mkdir dir="${build}"/>
    </target>
  
    <target name="compile" depends="init"
          description="compile the source " >
      <!-- Compile the java code from ${src} into ${build} -->
-     <javac debug="off" source="1.7" target="1.7" srcdir="${src}" destdir="${build}"/>
+     <javac debug="off" source="${source}" target="${target}" srcdir="${src}" destdir="${build}" fork="true" executable="${javac}"/>
    </target>
  
    <target name="run" depends="dist"
      description="run J2DBench" >
      <java jar="${dist}/J2DBench.jar"
         fork="true"
+        jvm="${java}"
      >
      </java>
    </target>
  
    <target name="analyze" depends="dist"
      description="run J2DAnalyzer" >
      <java jar="${dist}/J2DAnalyzer.jar"
         fork="true"
+        jvm="${java}"
      >
      </java>
    </target>
  
    <target name="resources" depends="init"
< prev index next >