[java] Missing artifact com.sun:tools:jar

After trying out all the above I was still having the same issue.

  • PATH environment variable point to JDK 1.7\bin
  • My JAVA_HOME environment variable was pointed to the JDK 1.7
  • My eclipse.ini had the javaw -vm entry pointing to JDK 1.7
  • My eclipse preference had JDK 1.7 as the installed JRE.
  • My project build path was using JDK 1.7.

Then I tried the following,

  • Open a command prompt and typed java -version. It showed me a JRE version 1.8.

  • Open a command prompt and went to location of the JDK 1.7 bin directory and typed java -version. This time it showed correctly 1.7.

Then after digging at few places I found that apart from the above locations there are additional locations for Java runtime.

Registry

There is also a registry key where JRE location are specified under

HKLM\Software\Javasoft\Version

I changed the entries here to point to the JDK 1.7

ProgramData

The directory "C:\ProgramData\Oracle\Java\javapath" is present in PATH environment variable and contains shortcuts to the java, javaw etc... The target for these shortcuts were all JRE 1.8. (This I think was the main problem) I changed the shortcuts to point to the correct JDK exe's.

Once all of this was done. I opened eclipse all the jdk.tools pom.xml errors disappeared.

Examples related to java

Under what circumstances can I call findViewById with an Options Menu / Action Bar item? How much should a function trust another function How to implement a simple scenario the OO way Two constructors How do I get some variable from another class in Java? this in equals method How to split a string in two and store it in a field How to do perspective fixing? String index out of range: 4 My eclipse won't open, i download the bundle pack it keeps saying error log

Examples related to maven

Maven dependencies are failing with a 501 error Why am I getting Unknown error in line 1 of pom.xml? Why am I getting "Received fatal alert: protocol_version" or "peer not authenticated" from Maven Central? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Unable to compile simple Java 10 / Java 11 project with Maven ERROR Source option 1.5 is no longer supported. Use 1.6 or later 'react-scripts' is not recognized as an internal or external command How to create a Java / Maven project that works in Visual Studio Code? "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository Java.lang.NoClassDefFoundError: com/fasterxml/jackson/databind/exc/InvalidDefinitionException

Examples related to playn

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.10:test Missing artifact com.sun:tools:jar