DarkMatter in Cyberspace
  • Home
  • Categories
  • Tags
  • Archives

"package com.sun.xml.internal.bind.v2 does not exist" Solution


When execute javac task in ant under openjdk(I also find this problem in Oracle JDK 1.6, 2014-3-21), you may encounter "package com.sun.xml.internal.bind.v2 does not exist" error, which is because this package only exists in Oracle (Sun) JDK, but not in openjdk. To resolve this problem, add compiler arguments "-XDignore.symbol.file=true" to javac task:

<javac destdir="${src.class.dir}" encoding="UTF-8" debug="true" classpathref="lib.path" failonerror="true"> 
    <src path="${src.dir}"/> 
    <compilerarg line="-XDignore.symbol.file=true" /> 
</javac>

This is also valid when using javac in command line.



Published

Jul 8, 2013

Last Updated

Jul 8, 2013

Category

Tech

Tags

  • Ant 21

Contact

  • Powered by Pelican. Theme: Elegant by Talha Mansoor