3

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!

rym
  • 33
  • 1
  • 1
  • 3

3 Answers3

5

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

Hope it helps you.

Anant
  • 51
  • 1
  • 5
  • After what you write, you need also add this configuration to your project. Right click in project --> properties --> Java Build Path --> Libraries --> JRE System Library ... --> Edit --> Alternate JRE : choose JDK added before to your eclipse. – يعقوب May 03 '23 at 14:29
2

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>
Hany Kamal
  • 21
  • 1
0

** 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