Generating jaxb classes from a schema

After a lot of research here is what I have done to fix the issue. Windows> Preferences> Java> InstalledJREs...make sure to point your jre to the jdk directory. I was pointing to JRE and as soon as I changed it to JDK, it started working. Hope this will help you guys.


Make sure to include the jaxb-impl.jar library in your project. You can download one for example from here: https://repo1.maven.org/maven2/com/sun/xml/bind/jaxb-impl/2.2.4/jaxb-impl-2.2.4.jar

If you're using Maven, you can include this as a dependency, otherwise download the file and add it as a library in your project.

If you need a different version of the library, move up one directory in the link that I added above, you can find other versions there as well.

If you want to automate the class generation, since you're changing the schema on a regular basis, you should automate the process, e.g through Maven.


Windows> Preferences> Java> InstalledJREs > Execution Environment. Select an environment JDK 1.8 and then try to create JAXB Classes.

Click on Below Image Link For Details.

Select the execution Environment

Tags:

Java

Eclipse

Jaxb