On 2020-04-08, Martin Gainty wrote: > contents of build.xml > <target name="compile" description="compile the source"> > <!-- Compile the Java code from ${src} into ${build} --> > <path id="lib.path.ref"> > <fileset dir="./target/classes"/> > <fileset dir="$USER_HOME/.m2/REPOSI~1/org/jvnet/SORCER~1\0.8\jar"/> > <fileset dir="./target/classes"/> > </path> > <javac srcdir="${src}" destdir="${build}" classpath="./target/classes" > source="1.9" target="1.9"> > <compilerarg value="--patch-module java.base=src -d > ./src/main/java/jdk/compiler/DocTree.java" /> > <classpath> > <pathelement > location="$USER_HOME/.m2/REPOSI~1/org/slf4j/SLF4J-~1/1.7.9/slf4j-api-1.7.9.jar"/> > <pathelement > location="$USER_HOME/.m2/REPOSI~1/org/jvnet/SORCER~1/0.8/sorcerer-javac-0.8.jar"/> > <pathelement location="/Java/JDK18~1.0_1/jre/lib"/> > <pathelement location="./target/classes"/> > </classpath> > </javac>
> the good news is that <compilerarg> seems to be recognised by javac > the bad news is when running >> ant compile > build.xml:16: Error starting modern compiler It sure says mor than just "error startign the modern compiler". What is the actual error? > <compilerarg value="--patch-module java.base=src -d > ./src/main/java/jdk/compiler/DocTree.java" /> The value attribute takes the string you provide and turns it into a single command line argument. This is not what javac expects. Either use separate <compilerarg> elements per argument or use the line attribute as in <compilerarg line="--patch-module java.base=src -d ./src/main/java/jdk/compiler/DocTree.java" /> which splits the attribute's value into separate arguments on spaces. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org