Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Suddenly getting "Missing artifact com.sun:tools:jar:0" in Maven project
Suddenly getting "Missing artifact com.sun:tools:jar:0" in Maven project [message #1761074] Sat, 06 May 2017 05:31 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 801
Registered: July 2009
Senior Member
Win7, Neon.3.

I've been working with a largish multimodule Maven project, originally using JDK 1.8.0_102. This was working perfectly fine in Eclipse.

I had then tried to run the JDK 1.8.0_131 installer. The behavior of this seemed odd, as after I clicked the "Yes" button to run the application, it never brought up a dialog to ask where to install it. That seemed to cause a cascade of events that I don't quite understand.

The principal symptom is that now in Eclipse, all of the modules in this project are getting the error "Missing artifact com.sun:tools:jar:0".

At some point after this, I went to the Control Panel and uninstalled the JDK and JRE for 102 and 131. I then reinstalled the 102 JDK and made sure the "-vm" parameter in the eclipse.ini file is pointing to that jDK. Unfortunately, this resulted in no change to the symptom.

A reasonable guess for this would be that my JAVA_HOME is pointing to a JRE, not a JDK. That is not the case. I clearly set it to point to my "jdk1.8.0_102" distribution.

However, I did notice that there is a "C:\ProgramData\Oracle\Java\javapath" directory, and the contents of that directory are three files named "java", "Javaw", and "javaws", and they are symlinks to the binaries in the JRE, not the JDK, and that directory is first in my PATH.

I also ran visualvm and inspected the system properties of the Eclipse process. I saw some oddities in that list. In the "eclipse.commands" value, which looks somewhat like the contents of "eclipse.ini", I found two "-vm" values, the first being my JDK 102 location, and the SECOND being "c:\Program Files\Java\jdk1.8.0_102\bin\..\jre\bin\server\jvm.dll". I then saw that "java.home" was set to "c:\Program Files\Java\jdk1.8.0_102\jre".

I also note the following confusing output:
C:\Windows\system32>java -version
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)

C:\Windows\system32>set JAVA_HOME
JAVA_HOME=c:\Program Files\Java\jdk1.8.0_102


This tells me that JAVA_HOME points to the JDK, but executing java still thinks it's a JRE.

I'm confused.
Re: Suddenly getting "Missing artifact com.sun:tools:jar:0" in Maven project [message #1761342 is a reply to message #1761074] Tue, 09 May 2017 21:05 Go to previous message
Eclipse UserFriend
This isn't an Eclipse Platform question, but an m2eclipse question. From this StackOverflow question, it sounds like m2eclipse uses the default JRE, which probably defaults to the running JRE/JDK. From that StackOverflow question, some people have had success changing the default to a particular JDK.

Or you could do the exclusions approach which, if possible, would likely be the better choice since it would ensure your command-line build doesn't require being run with a JDK.

Brian.
Previous Topic:How can get all the enumeration literals using AQL
Next Topic:Dynamically loading plugin from another plugin
Goto Forum:
  


Current Time: Thu Apr 25 17:51:12 GMT 2024

Powered by FUDForum. Page generated in 0.02927 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top