How do I solve compile-time dependency for modules that are removed in JDK11?
Issue
- Error
package javax.jws does not exist
occurs when compiling an application that uses JAX-WS with JDK11. If we compile with JDK8, there is no error:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/test/IdeaProjects/testapp/src/main/java/org/example/servlet/HelloService.java:[3,17] package javax.jws does not exist
[ERROR] /home/test/IdeaProjects/testapp/src/main/java/org/example/servlet/HelloService.java:[5,2] cannot find symbol
symbol: class WebService
- Java EE packages have been removed from JDK11 due to JEP 320: Remove the Java EE and CORBA Modules
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 7.2 or later (JDK11 supported EAP versions)
- OpenJDK 11
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.