Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which JAXB version was used in Java 8?

JAXB (Java Architecture for XML Binding) has been publised as Maven artifacts although it was bundled with JREs until Java 8 (and Java 9/10 with an option).

My question here is: Which JAXB version on Maven Central corresponds to Java 8's bundled version? (And, also for Java 9/10's under a feature option?)

I'm seeing in https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api :

  • 2.2.* (~ 2.2.12)
  • 2.3.0
  • 2.3.1
  • 2.4.0-* (under development)
  • (3.0.0 to be jakarta.xml.*)
like image 910
Dai MIKURUBE Avatar asked Sep 01 '26 04:09

Dai MIKURUBE


1 Answers

As far as Java 8:

$ $(/usr/libexec/java_home -v 1.8)/bin/xjc -version
xjc 2.2.8-b130911.1802

which is documented here specifying the Maven coordinates:

<dependency>
  <groupId>org.glassfish.jaxb</groupId>
  <artifactId>jaxb-bom</artifactId>
  <version>2.2.8</version>
  <type>pom</type>
</dependency>

although

          <dependency>                                                          
            <groupId>javax.xml.bind</groupId>                                   
            <artifactId>jaxb-api</artifactId>                                   
            <version>2.2.8</version>                                            
            <scope>provided</scope>                                             
          </dependency>

is accurate for Java 8. For Java 9+, the latest available (as you observed) is:

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.4.0-b180830.0359</version>
</dependency>
like image 63
Allen D. Ball Avatar answered Sep 02 '26 18:09

Allen D. Ball



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!