I recently had to migrate to a new machine and re-installed Eclipse. At the moment, I need to generate JAXB classes from an xsd. I cannot quite remember what I installed, b
I installed this plugin
http://java.net/downloads/jaxb-workshop/IDE%20plugins/jaxbw-plugin.zip
i.e. unzip and copy to eclipse/plugin folder.
It adds an entry "JAXB 2.1 > Run XJC" to the context menu of *.xsd files.
So the menu's not really in the proper place, but it works.
In order to support the standard JAXB APIs in the IntelliJ IDEA Community Edition environment, you need to make some adjustments. One way to implement JAXB technology is to connect the xjc.exe utility included in the JDK toolkit. This utility can be launched at the command prompt, but it is advisable to configure the context menu:
In the Edit Toolbox dialog enter:
(Name :)
of the new Generate JAXB Classes command;, which should be selected on the particular computer in the file selection dialog
(button "..." )`parameters (Parameters :)
which in our case will be as follows:
$ p $ FileFQPackage $ $ SourcepathEntry $ $ FilePath $
In order for the created command to work correctly, the schema file should be placed in a new package, which will then appear with the generated files.
In the settings window, Tools | External Tools - "Your command name" will appear. All you need is to open your schema file and run the command.
(I'm using IBM's Eclipse-based RAD, so I don't know whether this applies to raw Eclipse.)
Have a look at your project Facets (select project, rightClick->Properties, Project Facets) I have the option of selecting JAX/RS.
later: I've checked my plugins and by default I get Dali installed and it does contain some JAX/B-related stuff. I suspect you do need this.
A simple fix for this problem - rather than worrying about adding additional plugins or installs - is to install Eclipse IDE for Java EE Developers rather than Eclipse Classic (both to be found here). This comes with the JAXB support and therefore provides the >Generate>Jaxb classes option.
If you're using Eclipse EE all you have to do is switch your running environment from JRE to JDK and that should fix it. Windows -> Preference -> Java -> Installed JRE -> Add - > (Choose Standard VM) Then Select JDK! Then Execution Environments under Installed JRE select your JavaSE-1.8 or your version and also select JDK!
If you don't have JavaEE:
Help>>Install New Software>>Works with:--All Available Sites--
Search for JAXB
Then select Web, XML, Java EE and OSGi Enterprise Development and install.
After you restart Eclipse you should see the generate option.