0

I'm trying to compile the mahout using maven2, but there's an error: "Embedded error: tools.jar not found: /usr/lib/jvm/java-6-openjdk-i386/jre/../lib/tools.jar" So I think if I change the path from jre to jdk, tools.jar will be found. But the question is how to change the path for maven2? Any suggestion is appreciated.

2
  • 3
    I assume you should change JAVA_HOME env variable. Commented Oct 21, 2012 at 20:29
  • Actually, I can use update-alternative to update the path. Commented Oct 21, 2012 at 22:00

2 Answers 2

2

I found the solution in another thread: Why maven ignores my JAVA_HOME?

Reinstalling jdk worked for me as well: sudo apt-get install openjdk-6-jdk

Sign up to request clarification or add additional context in comments.

Comments

1

You will need both Java JDK and JRE.

${java.home} specifies the path to the current JRE_HOME environment use with relative paths to get for example: ${java.home}../bin/java.exe

And with a JDK for example in c:\jdk the maven ${java.home} is pointing to c:\jdk\jre

1 Comment

I think if you install JDK, you automatically have jre.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.