I'm trying to learn to produce webservices with Java. I have added JAXB plugin to eclipse/plugin folder and I restarted eclipse. I have added a .xsd file to the source folder under eclipse and I am trying to generate classes from the xsd file. The tutorial mentions that, when I right click on the .xsd file, I should see an option called "JAXB 2.1 - > run XJC", but I don't see any such option on my eclipse installation. I only see "Generate - > JAXB Classes option". If I select this option and force it build classes, it gives out an error saying:
The classpath for this project does not appear to contain the necessary libraries to proceed with class generation.
Please insure that a JAXB implementation is available on the classpath. Couldn't find the main class com.sun.tools.xjc.XJFacade.
Can someone help me to figure out why am I not seeing that option under eclipse? I tried both galileo and Helios.
Check with the installed JRE in eclipse
Preference > Java > Installed JRE
If it points to jre then point it to jdk installation directory. It fixed the error for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With