Problems with importing com.sun.org.apache.xpath.internal.operations

I'm new to Java, and I am trying to import a project from GitHub into Intellij just to get the hang of it. I get an error message when I try to build the solution, and it is saying that the package "com.sun.org.apache.xpath.internal.operations" does not exist. Does anybody know whats wrong? Would really appreciate answers.

My code goes as follows:

import com.sun.org.apache.xpath.internal.operations.Bool;
5

2 Answers

I had the same problem and changed the SDK for my project from 10 to 1.8. Solved it. For IntelliJ, go to File --> Project Structure

I know this answer is a bit late, but I have just experienced a similar issue and stumbled on this question.

The package you are referring to exists in different locations in different releases of Java. In my opinion, the simplest solution is to try to match the version of Java that was originally used to build the project that you are talking about. I say this as your project may contain other dependencies on that same version of Java, which you are not yet aware of.

In your case, I believe that running the project with Java 1.6 will solve this issue.

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like