Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jaxb: xjc.sh java.activation not found

I've downloaded jaxb-ri:

$ tree -L 1
.
├── bin
├── docs
├── License.txt
├── mod
├── samples
└── ThirdPartyLicenseReadme.txt

My java version is:

$ java -version
openjdk version "11.0.7" 2020-04-14

Nevertheless, when I'm trying to perform xjc.sh -help, I'm getting this error message:

Java major version: 11
java.lang.module.FindException: Module java.activation not found, required by com.sun.istack.runtime
    at java.base/java.lang.module.Resolver.findFail(Resolver.java:877)
    at java.base/java.lang.module.Resolver.resolve(Resolver.java:191)
    at java.base/java.lang.module.Resolver.resolve(Resolver.java:140)
    at java.base/java.lang.module.Configuration.resolveAndBind(Configuration.java:315)
    at java.base/java.lang.module.ModuleDescriptor$1.resolveAndBind(ModuleDescriptor.java:2693)
    at java.base/jdk.internal.module.ModuleBootstrap.boot(ModuleBootstrap.java:354)
    at java.base/java.lang.ClassLoader.initializeClassLoaders(ClassLoader.java:211)
    at java.base/java.lang.Thread.initialize(Thread.java:430)
    at java.base/java.lang.Thread.<init>(Thread.java:155)
like image 419
Jordi Avatar asked Nov 08 '25 10:11

Jordi


1 Answers

You need to include the javax.activation module. I did it by:

  • Download jar: javax.activation-1.2.0.jar (or from maven)
  • Copy it to the "mod" folder
  • Add downloaded jar in the jsc.sh file under JAXB_PATH, like so:
    ...
    JAXB_PATH=${JAXB_HOME}/mod/jaxb-xjc.jar:\
    ${JAXB_HOME}/mod/javax.activation-1.2.0.jar:\
    ${JAXB_HOME}/mod/jaxb-api.jar:\
    ...

Then run the xjc.sh again :)

like image 160
alex-jesper Avatar answered Nov 10 '25 02:11

alex-jesper



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!