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!
Error: Could not find or load main class com.sun.tools.internal.xjc.XJCFacade
11.8k Views Asked by rym At
3
There are 3 best solutions below
0
On
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>
0
On
** 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
Please try pointing the 'installed JRE' to JDK in eclipse->windows->preferences->installed JRE
Hope it helps you.