1

On running build.xml, getting following error. build.xml:147: taskdef class com.sun.tools.xjc.XJCTask cannot be found

Tried giving the executable permission to lib folder and all jar files but still no luck

<taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
    <classpath>
        <fileset dir="${lib.dir}" includes="*.jar" />
    </classpath>
</taskdef>

<taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport">
    <classpath>
        <fileset dir="${lib.dir}" includes="*.jar" />
    </classpath>
</taskdef>

on mouse hover on taskdef in build.xml, shows following warning taskdef class com.sun.tools.xjc.XJCTask cannot be found using the classloader AntClassLoader

CAustin
  • 4,525
  • 13
  • 25
PrateekSethi
  • 56
  • 1
  • 8
  • Take a look here https://stackoverflow.com/questions/48770937/how-do-you-modify-an-xjc-block-in-ant-build-xml-for-java-9. Most probably in Java 9+, you'll have to add jaxb classes to classpath. – Dmitriy Popov Jul 09 '19 at 20:11
  • Do you actually have jaxb-xjc.jar stored in `${lib.dir}`? – CAustin Jul 10 '19 at 18:15

0 Answers0