title: Build.xml Compile failed; see the compiler error output for details
body: <p>I am trying to create L2j server (Interlude) server. However when I'm trying to compile the server pack file I get into trouble.</p>
  
  <p>When I run <code>build.xml</code> as Ant build I'm getting</p>
  
  <blockquote>
    <p>Compile failed; see the compiler error output for details</p>
  </blockquote>
  
  <p><strong>Error log</strong></p>
  
  <pre><code>Buildfile: C:\Users\tauti\git\l2j_server\L2J_Server\build.xml
  clean:
     [delete] Deleting directory C:\Users\tauti\git\l2j_server\L2J_Server\build
  init:
      [mkdir] Created dir: C:\Users\tauti\git\l2j_server\L2J_Server\build
      [mkdir] Created dir: C:\Users\tauti\git\l2j_server\L2J_Server\build\classes
      [mkdir] Created dir: C:\Users\tauti\git\l2j_server\L2J_Server\build\dist
      [mkdir] Created dir: C:\Users\tauti\git\l2j_server\L2J_Server\build\dist\login
      [mkdir] Created dir: C:\Users\tauti\git\l2j_server\L2J_Server\build\dist\gameserver
  compile:
      [javac] Compiling 1213 source files to C:\Users\tauti\git\l2j_server\L2J_Server\build\classes
      [javac] An exception has occurred in the compiler (1.8.0_171). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
      [javac] java.lang.NullPointerException
      [javac]     at com.sun.tools.javac.file.Locations.getPathEntries(Locations.java:149)
      [javac]     at com.sun.tools.javac.file.Locations.getPathEntries(Locations.java:134)
      [javac]     at com.sun.tools.javac.file.Locations.access$000(Locations.java:71)
      [javac]     at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.computePath(Locations.java:617)
      [javac]     at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.lazy(Locations.java:643)
      [javac]     at com.sun.tools.javac.file.Locations$BootClassPathLocationHandler.getLocation(Locations.java:577)
      [javac]     at com.sun.tools.javac.file.Locations.getLocation(Locations.java:678)
      [javac]     at com.sun.tools.javac.file.JavacFileManager.getLocation(JavacFileManager.java:803)
      [javac]     at com.sun.tools.javac.file.JavacFileManager.list(JavacFileManager.java:617)
      [javac]     at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:2750)
      [javac]     at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:2446)
      [javac]     at com.sun.tools.javac.jvm.ClassReader.access$000(ClassReader.java:76)
      [javac]     at com.sun.tools.javac.jvm.ClassReader$1.complete(ClassReader.java:240)
      [javac]     at com.sun.tools.javac.code.Symbol.complete(Symbol.java:574)
      [javac]     at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:300)
      [javac]     at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:518)
      [javac]     at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:258)
      [javac]     at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:272)
      [javac]     at com.sun.tools.javac.comp.Enter.complete(Enter.java:486)
      [javac]     at com.sun.tools.javac.comp.Enter.main(Enter.java:471)
      [javac]     at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:982)
      [javac]     at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:857)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:523)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:381)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:370)
      [javac]     at com.sun.tools.javac.main.Main.compile(Main.java:361)
      [javac]     at com.sun.tools.javac.Main.compile(Main.java:56)
      [javac]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javac]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      [javac]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      [javac]     at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      [javac]     at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:58)
      [javac]     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1395)
      [javac]     at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:1121)
      [javac]     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
      [javac]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [javac]     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      [javac]     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      [javac]     at java.base/java.lang.reflect.Method.invoke(Unknown Source)
      [javac]     at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      [javac]     at org.apache.tools.ant.Task.perform(Task.java:348)
      [javac]     at org.apache.tools.ant.Target.execute(Target.java:435)
      [javac]     at org.apache.tools.ant.Target.performTasks(Target.java:456)
      [javac]     at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
      [javac]     at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
      [javac]     at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      [javac]     at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:36)
      [javac]     at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
      [javac]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:460)
      [javac]     at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:142)
  
  BUILD FAILED
  C:\Users\tauti\git\l2j_server\L2J_Server\build.xml:51: Compile failed; see the compiler error output for details.
  
  Total time: 29 seconds
  </code></pre>
  
  <p><strong>Build.xml</strong></p>
  
  <pre><code>&lt;/description&gt;
      &lt;property name="src" location="java" /&gt;
      &lt;property name="lib" location="lib" /&gt;
      &lt;property name="build" location="build" /&gt;
      &lt;property name="build.classes" location="${build}/classes" /&gt;
      &lt;property name="build.dist" location="${build}/dist" /&gt;
      &lt;property name="build.dist.login" location="${build.dist}/login" /&gt;
      &lt;property name="build.dist.game" location="${build.dist}/gameserver" /&gt;
      &lt;path id="classpath"&gt;
          &lt;fileset dir="${lib}"&gt;
              &lt;include name="c3p0-0.9.2-pre1.jar" /&gt;
              &lt;include name="bsf.jar" /&gt;
              &lt;include name="bsh-2.0b4.jar" /&gt;
              &lt;include name="commons-logging-1.1.jar" /&gt;
              &lt;include name="jython.jar" /&gt;
              &lt;include name="javolution-5.5.1.jar" /&gt;
              &lt;include name="mchange-commons-0.2.jar" /&gt;
              &lt;include name="mysql-connector-java-5.1.18-bin.jar" /&gt;
              &lt;include name="mmocore.jar" /&gt;
          &lt;/fileset&gt;
      &lt;/path&gt;
      &lt;target name="init" depends="clean" description="Create the output directories."&gt;
          &lt;mkdir dir="${build}" /&gt;
          &lt;mkdir dir="${build.classes}" /&gt;
          &lt;mkdir dir="${build.dist}" /&gt;
          &lt;mkdir dir="${build.dist.login}" /&gt;
          &lt;mkdir dir="${build.dist.game}" /&gt;
      &lt;/target&gt;
      &lt;target name="compile" depends="init" description="Compile the source."&gt;
          &lt;javac destdir="${build.classes}" optimize="on" debug="on" source="1.8" target="1.8" nowarn="off" includeantruntime="false" deprecation="yes"&gt;
              &lt;src path="${src}" /&gt;
              &lt;classpath refid="classpath" /&gt;
              &lt;compilerarg value="-Xlint" /&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
      &lt;target name="jar" depends="compile" description="Create the jar file"&gt;
          &lt;jar destfile="${build}/l2jserver.jar"&gt;
              &lt;fileset dir="${build.classes}" /&gt;
              &lt;manifest&gt;
                  &lt;attribute name="Main-Class" value="net.sf.l2j.Server" /&gt;
                  &lt;attribute name="Class-Path" value=". bsf.jar bsh-2.0b4.jar commons-logging-1.1.jar c3p0-0.9.2-pre1.jar jython.jar mysql-connector-java-5.1.18-bin.jar javolution-5.5.1.jar mchange-commons-0.2.jar mmocore.jar" /&gt;
              &lt;/manifest&gt;
          &lt;/jar&gt;
          &lt;copy todir="${build.dist.login}"&gt;
              &lt;fileset dir="${build}"&gt;
                  &lt;include name="l2jserver.jar" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.game}"&gt;
              &lt;fileset dir="${build}"&gt;
                  &lt;include name="l2jserver.jar" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
      &lt;/target&gt;
      &lt;target name="build" depends="jar"&gt;
          &lt;copy todir="${build.dist.login}"&gt;
              &lt;fileset dir="${src}"&gt;
                  &lt;include name="log.cfg" /&gt;
                  &lt;include name="banned_ip.cfg" /&gt;
                  &lt;include name="console.cfg" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.game}"&gt;
              &lt;fileset dir="${src}"&gt;
                  &lt;include name="log.cfg" /&gt;
                  &lt;include name="console.cfg" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.login}"&gt;
              &lt;fileset dir="${src}/../lib"&gt;
                  &lt;include name="c3p0-0.9.2-pre1.jar" /&gt;
                  &lt;include name="mysql-connector-java-5.1.18-bin.jar" /&gt;
                  &lt;include name="javolution-5.5.1.jar" /&gt;
                  &lt;include name="mmocore.jar" /&gt;
                  &lt;include name="mchange-commons-0.2.jar" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.game}"&gt;
              &lt;fileset dir="${src}/../lib"&gt;
                  &lt;include name="*.jar" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist}"&gt;
              &lt;fileset dir="${basedir}"&gt;
                  &lt;include name="changes.txt" /&gt;
                  &lt;include name="LICENSE.txt" /&gt;
                  &lt;include name="README.txt" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist}"&gt;
              &lt;fileset dir="${src}/../lib"&gt;
                  &lt;include name="*LICENSE*" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.login}"&gt;
              &lt;fileset dir="dist"&gt;
                  &lt;include name="startAccountManager.*" /&gt;
                  &lt;include name="startSQLAccountManager.*" /&gt;
                  &lt;include name="LoginServer_loop.sh" /&gt;
                  &lt;include name="startLoginServer.*" /&gt;
                  &lt;include name="RegisterGameServer.*" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.game}"&gt;
              &lt;fileset dir="dist"&gt;
                  &lt;include name="GameServer_loop.sh" /&gt;
                  &lt;include name="startGameServer.*" /&gt;
                  &lt;include name="hibernate.cfg.xml" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;fixcrlf srcdir="${build.dist.game}" eol="lf" eof="remove" includes="**/*.sh"&gt;
          &lt;/fixcrlf&gt;
          &lt;fixcrlf srcdir="${build.dist.login}" eol="lf" eof="remove" includes="**/*.sh"&gt;
          &lt;/fixcrlf&gt;
          &lt;fixcrlf srcdir="${build.dist.game}" eol="crlf" eof="remove" includes="**/*.bat"&gt;
          &lt;/fixcrlf&gt;
          &lt;fixcrlf srcdir="${build.dist.login}" eol="crlf" eof="remove" includes="**/*.bat"&gt;
          &lt;/fixcrlf&gt;
          &lt;mkdir dir="${build.dist.game}/log" /&gt;
          &lt;mkdir dir="${build.dist.login}/log" /&gt;
          &lt;mkdir dir="${build.dist.game}/hibernate-mapping" /&gt;
          &lt;mkdir dir="${build.dist.game}/config" /&gt;
          &lt;mkdir dir="${build.dist.login}/config" /&gt;
          &lt;copy todir="${build.dist.game}/config"&gt;
              &lt;fileset dir="java/config"&gt;
                  &lt;include name="*.properties" /&gt;
                  &lt;exclude name="loginserver.properties" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;copy todir="${build.dist.login}/config"&gt;
              &lt;fileset dir="java/config"&gt;
                  &lt;include name="loginserver.properties" /&gt;
                  &lt;include name="telnet.properties" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;mkdir dir="${build.dist.game}/data" /&gt;
          &lt;copy todir="${build.dist.game}/data"&gt;
              &lt;fileset dir="data"&gt;
                  &lt;include name="*.csv" /&gt;
                  &lt;include name="*.txt" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;mkdir dir="${build.dist.game}/data/geodata" /&gt;
          &lt;copy todir="${build.dist.game}/data/geodata"&gt;
              &lt;fileset dir="data/geodata"&gt;
                  &lt;include name="*.txt" /&gt;
                  &lt;include name="*.l2j" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;mkdir dir="${build.dist.game}/data/pathnode" /&gt;
          &lt;copy todir="${build.dist.game}/data/pathnode"&gt;
              &lt;fileset dir="data/pathnode"&gt;
                  &lt;include name="*.txt" /&gt;
                  &lt;include name="*.pn" /&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
          &lt;zip destfile="${build}/L2J_Server.zip" basedir="${build.dist}" /&gt;
      &lt;/target&gt;
      &lt;target name="clean" description="Remove the output directories"&gt;
          &lt;delete dir="${build}" /&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The 50-55 lines would be:</p>
  
  <pre><code>&lt;target name="compile" depends="init" description="Compile the source."&gt;
          &lt;javac destdir="${build.classes}" optimize="on" debug="on" source="1.8" target="1.8" nowarn="off" includeantruntime="false" deprecation="yes"&gt;
              &lt;src path="${src}" /&gt;
              &lt;classpath refid="classpath" /&gt;
              &lt;compilerarg value="-Xlint" /&gt;
          &lt;/javac&gt;
  </code></pre>
  
  <p>If I run another (very similar) <code>build.xml</code> I get almost the same error it directs me to different line (89) in that build lines 88-90 are:</p>
  
  <pre><code>&lt;target name="compile" depends="init" description="Compile the source."&gt;
          &lt;javac srcdir="${src}" classpathref="classpath" destdir="${build.classes}" compiler="javac1.8" debug="false" debuglevel="lines,vars,source" includeantruntime="false" source="1.8" target="1.8" /&gt;
      &lt;/target&gt;
  </code></pre>
  
  <p>I am using JDK 1.8.0_171, as the newer ones didn't have tools.jar and I got different error which I wasn't able to solve (with this JDK I was able to run another build (L2j server datapack). </p>
  
  <p>Please suggest.</p>