Results 1 to 5 of 5

Thread: tools.jar not found, Spring Roo, STS

  1. #1
    Join Date
    Oct 2011
    Posts
    4

    Default tools.jar not found, Spring Roo, STS

    I've seen others have this problem (on forums etc.). The most common solution is to make sure you are using a JDK and that JAVA_HOME is set to the JDK.

    STS.ini has
    Code:
    -vm
    C:\Program Files\java\jdk1.6.0_27\bin\javaw.exe
    I wrote a *.bat file ...
    Code:
    echo %JAVA_HOME%
    That gives me ...
    C:\Program Files\java\jdk1.6.0_27\bin

    but when trying to build the file, I still get:
    [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project WorkingMemory: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1]

    Another member of my team compiles the same project, no problem ... Only real difference between our machines is that I'm running 64-bit currently and he is on 32-bit windows (7). I have trouble believing that it's just 32 vs 64 bit that would be the issue.

    Thanks in advance!

  2. #2
    Join Date
    May 2010
    Posts
    413

    Default

    Quote Originally Posted by jwsprng View Post
    I've seen others have this problem (on forums etc.). The most common solution is to make sure you are using a JDK and that JAVA_HOME is set to the JDK.

    STS.ini has
    Code:
    -vm
    C:\Program Files\java\jdk1.6.0_27\bin\javaw.exe
    I wrote a *.bat file ...
    Code:
    echo %JAVA_HOME%
    That gives me ...
    C:\Program Files\java\jdk1.6.0_27\bin

    but when trying to build the file, I still get:
    [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project WorkingMemory: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1]

    Another member of my team compiles the same project, no problem ... Only real difference between our machines is that I'm running 64-bit currently and he is on 32-bit windows (7). I have trouble believing that it's just 32 vs 64 bit that would be the issue.

    Thanks in advance!
    I think that JAVA_HOME should be set to the root folder of your JDK install, not the bin folder. So try setting it to
    C:\Program Files\java\jdk1.6.0_27 (i.e. without 'bin' at the end)

    Don't know if that's the problem, but its worth a try.

    Another thing worth looking at is the Eclipse workspace configuration under "windows >> preferences >> Java >> installed JRE's" check whether the default JRE there is pointing to your JDK install.
    Kris De Volder -- SpringSource

  3. #3
    Join Date
    Jun 2011
    Posts
    14

  4. #4
    Join Date
    Sep 2008
    Location
    Hamburg, Germany
    Posts
    1,650

    Default

    Hi!

    Thats for the links and glad to hear your problem is solved!

    Cheers,
    -Martin
    Martin Lippert
    SpringSource, a division of VMware
    SpringSource Tools Team
    http://www.springsource.com
    http://twitter.com/martinlippert

  5. #5
    Join Date
    Jan 2013
    Posts
    1

    Default

    I know it's a bit old thread but it might help to someone...

    Quote Originally Posted by jwsprng View Post
    [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project WorkingMemory: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path C:\Program Files\Java\jre6/../lib/tools.jar -> [Help 1]
    I've just got the same error message while trying to compile a Spring project from the console using Maven. I have tried both 64-bit versions of JDK 1.6.0_23 and JDK 1.7.0_02 and got the same error message. Then I switched to 32-bit version of JDK 1.6.0_21 and all went fine.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •