Index: /trunk/build.xml
===================================================================
--- /trunk/build.xml	(revision 10047)
+++ /trunk/build.xml	(revision 10048)
@@ -9,5 +9,5 @@
 **
 -->
-<project xmlns:as="antlib:org.codehaus.mojo.animal_sniffer" name="josm" default="dist" xmlns:jacoco="antlib:org.jacoco.ant">
+<project xmlns:as="antlib:org.codehaus.mojo.animal_sniffer" name="josm" default="dist" xmlns:jacoco="antlib:org.jacoco.ant" xmlns:if="ant:if">
     <target name="init-properties">
         <!-- Load properties in a target and not at top level, so this build file can be
@@ -388,4 +388,5 @@
                 <junit printsummary="yes" fork="true" forkmode="once">
                     <jvmarg value="-Dfile.encoding=UTF-8"/>
+                	<jvmarg value="-XaddExports:java.base/sun.security.x509=ALL-UNNAMED" if:true="isJava9" />
                     <sysproperty key="josm.home" value="${test.dir}/config/@{testfamily}-josm.home"/>
                     <sysproperty key="josm.test.data" value="${test.dir}/data"/>
