Reputation: 58
I am trying to generate JavaClasses for an existing .xsd file. From the command line I could already manage to do so.
To acheive the same in eclipse I tried to rightclick on the .xsd > Generate > JAXB Classes... but in the next dialogue I get the Error:
" The classpath for this project does not appear to contain the necessary libraries to proceed with class generation."
I found many answsers refering to using the correct JDK, but I have already set jdk1.8.0 as a preference. (I use Eclipse Kepler)
I hope I provided all neccessary information and that anyone can help me fix this issue, Thanks in advance
Upvotes: 1
Views: 11157
Reputation: 107
I got this to work by adding jaxb jar files to my project's classpath. I included: jaxb-core-2.3.0.jar, jaxb-impl-2.3.0.jar, and jaxb-xjc-2.3.0.jar. The impl jar was only added when I started using a bindings file which required me to enable vendor extensions. Otherwise the core and xjc jars were all I needed. I included links to where I got my jars in case you do not already have them
http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-xjc/2.3.0
http://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-core/2.3.0
https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl/2.3.0
Upvotes: 3