Java 9 deprecated six modules that contain Java EE APIs and they are going to be removed soon:
javax.activation
pack
Im using jdk 11 + ant + ivy in my spring mvc project. I was getting error "package javax.jws does not exist" so I added javax.jws-api-1.1.jar to classpath and it worked! Just download the jar from https://repo1.maven.org/maven2/javax/jws/javax.jws-api/1.1/javax.jws-api-1.1.jar And add it to your classpath in your build.xml
Instead of using the deprecated Java EE modules, use the following artifacts.
JavaBeans Activation Framework (now Jakarta Activation) is a standalone technology (available on Maven Central):
<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>1.2.2</version>
</dependency>
(Source)
From JEP 320:
There will not be a standalone version of CORBA unless third parties take over maintenance of the CORBA APIs, ORB implementation, CosNaming provider, etc. Third party maintenance is possible because the Java SE Platform endorses independent implementations of CORBA. In contrast, the API for RMI-IIOP is defined and implemented solely within Java SE. There will not be a standalone version of RMI-IIOP unless a dedicated JSR is started to maintain it, or stewardship of the API is taken over by the Eclipse Foundation (the transition of stewardship of Java EE from the JCP to the Eclipse Foundation includes GlassFish and its implementation of CORBA and RMI-IIOP).
Stand alone version:
<dependency>
<groupId>jakarta.transaction</groupId>
<artifactId>jakarta.transaction-api</artifactId>
<version>1.3.3</version>
</dependency>
(Source)
Since Java EE was rebranded to Jakarta EE, JAXB is now provided by new artifacts:
<!-- API -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>
<!-- Runtime -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.3</version>
<scope>runtime</scope>
</dependency>
JAXB Reference Implementation page.
schemagen
and xjc
can be downloaded from there too as part of a standalone JAXB distribution.
See also linked answer.
Reference implementation:
<!-- API -->
<dependency>
<groupId>jakarta.xml.ws</groupId>
<artifactId>jakarta.xml.ws-api</artifactId>
<version>2.3.3</version>
</dependency>
<!-- Runtime -->
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.3.3</version>
</dependency>
Standalone distribution download (contains wsgen
and wsimport
).
Java Commons Annotations (available on Maven Central):
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
<version>1.3.5</version>
</dependency>
(Source)