1

I installed OpenJDK 11. And I need to run the jar application from Internet and it throw Excepion about JAXB. How to add JAXB to OpenJDK 11 to make this application could work?

The question in here just tell me to add to maven but this application I just got jar file.

Nhân Trần
  • 85
  • 11
  • is this a mvn project. you have to add JAXB lib to your classpath. All the java EE related packages is removed from JDK, JAXB is also part of that. – Keaz Sep 30 '19 at 08:02

2 Answers2

1

See How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9 for Maven dependencies needed for JAXB in Java 11.

Each Maven dependency identifies a jar file you need, so get those jar files and put them on the classpath, together with your jar file, when you run your program.

See also:
Adding Classes to the JAR File's Classpath
Including dependencies in a jar with Maven

Andreas
  • 154,647
  • 11
  • 152
  • 247
0

Ok the answer is get all missing jar file, then call java -cp

Nhân Trần
  • 85
  • 11