rym
rym

Reputation: 33

Error: Could not find or load main class com.sun.tools.internal.xjc.XJCFacade

i'm running eclipse luna with jdk 8 and i tried generating jaxb classes and this error kept showing, i tried multiple solutions found on internet but nothing really worked with me ps : i'm pointing jdk 8 not the jre. please help!

Upvotes: 3

Views: 13772

Answers (3)

** 1 . add below dependency**

  <dependency>
        <groupId>org.glassfish.jaxb</groupId>
        <artifactId>jaxb-xjc</artifactId>
        <version>3.0.0</version>
    </dependency>

** 2 . Then right click on the filename.xsd ->new ->Jaxb -> jaxB classes from schema >> then click next

specify the location where do you want to generate classes

-> then click finish

Upvotes: 0

Hany Kamal
Hany Kamal

Reputation: 21

Or you need to add the following dependency in your pom.xml file

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-xjc</artifactId>
    <version>${jaxb-xjc.version}</version>
</dependency>

Upvotes: 2

Anant
Anant

Reputation: 51

Please try pointing the 'installed JRE' to JDK in eclipse->windows->preferences->installed JRE

Hope it helps you.

Upvotes: 5

Related Questions