Announcement Announcement Module
Collapse
No announcement yet.
tools.jar not found, Spring Roo, STS Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      I had this problem, described here http://stackoverflow.com/questions/5...nhouse-locally

      Solved in http://stackoverflow.com/a/8915650/799502

      Comment


      • #4
        Hi!

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

        Cheers,
        -Martin

        Comment


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

          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.

          Comment

          Working...
          X