Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

"Package javax.xml.ws does not exist"

Writer Andrew Henderson

I am rusty on Java and completely new to IntelliJ IDEA, an IDE which has been causing a lot of problems for me so far. I am trying to run a program with the line "import javax.xml.ws.Response;". However, I get the error message "package javax.xml.ws does not exist."

I've tried to select the "Add Java EE 6 JARs to module dependencies" automated solution by IntelliJ IDEA, but it doesn't seem to do anything.

(I believe I am running Java 11, if it makes any difference at all. According to the readme by the author of the code, I should be running Java 8, but so far I haven't been able to because I get an unrelated error when trying to change Java versions with IntelliJ.)

What do I do? Thanks in advance.

4

3 Answers

Your issue is not related to Java version. It will work for both version 8 and 11.

You will need to either download the jaxws-api jar or add it as a Maven dependency accordingly.

You may download the Jar from the below maven repository URL, and then add it to your build path, or update your pom.xml with this dependency:

4

This is intermittent issue and can eat up hours. Try to do below steps

  1. Remove all dependencies from classpath.
  2. Close the project and open it again.
  3. Add all required dependencies.
  4. Clean your project.
1

Go to Project Structure and change Project SDK to Java 1.8 solved my problem

enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy