Maven Dependencies error in eclipse tools-1.8.0_45.jar

3,708 views
Skip to first unread message

RandyD

unread,
Jun 4, 2015, 2:15:13 PM6/4/15
to java-ch...@googlegroups.com
Hi,

When I include the maven dependency:

   <dependency>
  <groupId>net.openhft</groupId>
  <artifactId>chronicle</artifactId>
  <version>3.4.3</version>
  </dependency>


I get the error from eclipse:

The container 'Maven Dependencies' references non existing library 'C:\Users\randyd\.m2\repository\com\sun\java\tools\1.8.0_45\tools-1.8.0_45.jar'

Any ideas on what I need to do to fix this?

I have looked on my system and this file doesn't exist.  However their is a file called tools.jar in C:\Program Files\Java\jdk1.8.0_45\lib


My co-workers using a Mac don't seem to have this problem.  I am on Windows 7.

Java version:
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)


Here is a screen shot of my java build path window:


~Randy


Rob Austin

unread,
Jun 4, 2015, 2:19:14 PM6/4/15
to java-ch...@googlegroups.com
Do you get the same issue if you do a 

$mvn install 

From the command line. 
--
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Randy Danielson

unread,
Jun 4, 2015, 2:24:46 PM6/4/15
to java-ch...@googlegroups.com
Thanks for the response.  Yes I get the same error:

[ERROR] Failed to execute goal on project sc: Could not resolve dependencies for
 project sc:sc:war:0.0.1-SNAPSHOT: Could not find artifact com.sun.java:tools:ja
r:1.8.0_45 at specified path C:\Program Files\Java\jre1.8.0_45/../lib/tools.jar
-> [Help 1]


~Randy


--
You received this message because you are subscribed to a topic in the Google Groups "Chronicle" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/java-chronicle/zeQJimWslVQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to java-chronicl...@googlegroups.com.

Rob Austin

unread,
Jun 4, 2015, 3:37:39 PM6/4/15
to java-ch...@googlegroups.com
can you look in

C:\Program Files\Java\jre1.8.0_45/../lib/tools.jar

is the tool.jar there ?

also can you do a 

$mvn -version

if not where is the tool.jar ? what do you have your JAVA_HOME set to ?

Rob

Randy Danielson

unread,
Jun 4, 2015, 4:30:30 PM6/4/15
to java-chronicle
No the tools.jar is not in the JRE folder:
C:\Program Files\Java\jre1.8.0_45\lib

but it is in the JKD lib folder:
C:\Program Files\Java\jdk1.8.0_45\lib

My JAVA_HOME was pointing to the the JRE folder so I changed it to the JDK.

Now from the command line "mvn install" does work!!!


Thanks for that.  Now is there a way to get Eclipse / Maven configured so it will work from in Eclipse?



Maven version:

Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:3
7-07:00)
Maven home: C:\Program Files\Apache Software Foundation\apache-maven-3.3.3\bin\.
.
Java version: 1.8.0_45, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jre1.8.0_45
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"



Thanks

~Randy

Randy Danielson

unread,
Jun 4, 2015, 5:00:13 PM6/4/15
to java-chronicle
Hey thanks for the help again.  I think I got Eclipse working right now too.

There is a bug in Eclipse:

So the fix was to modify the eclipse.ini file

I added these two lines to the ini file before the -vmargs line:
-vm
C:\Program Files\Java\jdk1.8.0_45\bin\java.exe


On Thu, Jun 4, 2015 at 12:37 PM, Rob Austin <rob.a...@higherfrequencytrading.com> wrote:

Rob Austin

unread,
Jun 4, 2015, 5:16:16 PM6/4/15
to java-ch...@googlegroups.com
Sorry - I can't really help you with that, as I use IntelliJ idea. 
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.

Rob Austin

unread,
Jun 4, 2015, 5:16:39 PM6/4/15
to java-ch...@googlegroups.com
Cool
You received this message because you are subscribed to the Google Groups "Chronicle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to java-chronicl...@googlegroups.com.

shalom...@gmail.com

unread,
Jun 15, 2015, 3:11:17 AM6/15/15
to java-ch...@googlegroups.com
This is what worked for me:
 
<dependency>
<groupId>net.openhft</groupId>
<artifactId>chronicle</artifactId>
<version>3.4.3</version>
<exclusions>
 <exclusion>
   <groupId>com.sun.java</groupId> 
                           <artifactId>tools</artifactId>
 </exclusion>
</exclusions>
</dependency>

Shalom 
Reply all
Reply to author
Forward
0 new messages