Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 10257)
+++ /trunk/build.xml	(revision 10258)
@@ -700,6 +700,4 @@
             includeantruntime="false" createMissingPackageInfoClass="false"
             encoding="UTF-8" classpath="${proj-classpath}">
-            <!-- workaround to https://bz.apache.org/bugzilla/show_bug.cgi?id=59556 -->
-            <compilerarg value="-XaddExports:java.base/jdk.internal.reflect=ALL-UNNAMED" compiler="javac1.9" />
         </javac>
     </target>
@@ -717,4 +715,6 @@
             </classpath>
             <arg value="${base.dir}"/>
+            <!-- workaround to https://bz.apache.org/bugzilla/show_bug.cgi?id=59556 -->
+            <jvmarg value="-XaddExports:java.base/jdk.internal.reflect=ALL-UNNAMED" if:set="isJava9" />
         </java>
     </target>
