How do I get xjc?

Go To StackoverFlow.com

6

So I've been looking at interfacing with xml files for a project I've been working on, and one of the things I want to do is generate java classes from a .dtd file. After some searching, I found out that xjc should be able to do what I want, but I cannot for the life of me find out where to get the program itself.

I feel like the answer is sitting right in front of me, but my google-fu is really failing me hardcore right now...

2012-04-04 05:53
by Ross Aiken


6

I got it when I installed java. It is probably on your system right now. Look in the directory where java, javac, etc are located.

2012-04-04 05:58
by emory
...wow. It was really that simple. I have two drives, with some of my program files on one and some on the other. I had searched throughout the java folder on my E: drive, which is where the majority of my installations go, but had completely forgotten about the C: drive. Also, as a side note, it looks like it was only in the java jdk folders, so you need the full jdk to make it work (in an effort to make this question at least slightly useful to other people - Ross Aiken 2012-04-04 06:02


3

Its part of the JDK. Check your Java bin folder.

2012-04-04 05:58
by barsju


3

Note that since Java 11, the JAXB was removed from the JDK. It has to be separately installed. There is a bin directory in the ZIP file where we can find the xjc and schemagen tools.

Download link: https://javaee.github.io/jaxb-v2/

2018-12-10 16:49
by Jan Bodnar


2

xjc is a tool in JAXB which is in Java SE, Java EE and Java Web Services and i'm sure many more. Read up on JAXB Here

2012-04-04 06:05
by apesa
Ads