| IAM looking for Java tools in wrong place? [message #19032] |
Thu, 21 May 2009 00:48  |
BenH Messages: 39 Registered: July 2009 |
Member |
|
|
An error has started today whenever I try to do a Maven build:
"Unable to locate the Javac Compiler in:C:\Program
Files\Java\jre6\..\lib\tools.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 Files\Java\jdk1.6.0_06\bin
Both contain tools.jar. I dont know why IAM's Maven is looking at
"C:\Program Files\Java\jre6\..\lib\tools.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
|
|
|
|
|
| Re: IAM looking for Java tools in wrong place? [message #648545 is a reply to message #19032] |
Thu, 13 January 2011 08:29   |
Eric Cornely Messages: 1 Registered: July 2009 |
Junior Member |
|
|
I installed m2eclipse which says when you're running a jre in place of a jdk so changed my eclipse.ini to this :
-startup
plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1.R36x_v20100810
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.6.0_23\bin
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
So i'm now sure that i use jdk to run eclipse. I switched my default installed JRE in eclipse preference to the jdk folder and added tools.jar but anyway when i use iam the problem occurs.
This problem doesn't occurs when using m2eclipse. Have you any hint ?
If you want to reproduce, just try using org.codehaus.mojo:jaxws-maven-plugin:1.10:wsimport with any wsdl
[Updated on: Thu, 13 January 2011 08:34] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.01599 seconds