0

I am new to Java and Eclipse. What I now need to do, is creating Java classes by using a XSD file. I found some solutions online, but they all did not work for me. It is important, that there is a code, that does the job. Clicking "generate" is not the way, I want to realize the challenge.

JRE: jdk1.8.0_92

Libraries: jaxb-api.jar, jaxb-core.jar, jaxb-impl.jar, jaxb-jxc.jar, jaxb-xjc.jar

sjantke
  • 605
  • 4
  • 9
  • 35
  • Why do you say "using Eclipse" in the title, and then say "Clicking generate is not the way", meaning that you don't want to use Eclipse? – Andreas May 31 '16 at 08:19
  • 1
    http://stackoverflow.com/questions/4248099/dynamically-generate-java-sources-without-xjc Is that what you need? – Maciek May 31 '16 at 08:22
  • Thanks, Maciek! That's what I was looking for... ;-) – sjantke May 31 '16 at 10:09

1 Answers1

0

Use the xjc command that comes with Java.

Compiles an XML schema file into fully annotated Java classes.

No need for any extra JAXB jar files.

Andreas
  • 154,647
  • 11
  • 152
  • 247