[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.iam] Re: IAM looking for Java tools in wrong place?

This is caused by Maven using the same JRE you've used to launch Eclipse (since it runs inside eclipse, it is not using the project's configuration).

If the problem showed recently, that probably means that you added a new maven plug-in to your build which requires a JDK.

You can force the use of a JDK with eclipse by adding the -vm PATH_TO_JDK command line option when launching eclipse.

--
Abel Muiño


BenH wrote:

An error has started today whenever I try to do a Maven build:

"Unable to locate the Javac Compiler in:C:Program FilesJavajre6..libtools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable"

The relevant project's JRE is pointing at a valid JDK 1.5 install.

Machine wide JAVA_HOME is set to C:Program FilesJavajdk1.6.0_06bin

Both contain tools.jar. I dont know why IAM's Maven is looking at "C:Program FilesJavajre6..libtools.jar". That path doesnt even exist on my machine, and is not mentioned in any env var.

Also, it didnt do this the last 2 days, running on same project and same machine and same IDE. Strange...

-Ben