java - JAXB eclipse error: There's no JAXB 2.2 API in the classpath -
i trying generate java classes xsd. added library following 2 files: com.sun.xml.bind_2.2.0.v201004141950.jar , com.sun.tools.xjc_2.2.0.jar, still gives me error
exception in thread "main" java.lang.classnotfoundexception: there's no jaxb 2.2 api in classpath @ com.sun.tools.xjc.classloaderbuilder.createprotectiveclassloader(classloaderbuilder.java:82) @ com.sun.tools.xjc.xjcfacade.main(xjcfacade.java:65)
what can problem? when created project chose jaxb 2.1 jre target runtime. need include make run?
make sure include jaxb-impl.jar library in project. can download 1 example here: http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.2.4/jaxb-impl-2.2.4.jar
if you're using maven, can include dependency, otherwise download file , add library in project.
if need different version of library, move 1 directory in link added above, can find other versions there well.
if want automate class generation, since you're changing schema on regular basis, should automate process, e.g through maven.
Comments
Post a Comment