Eclipse Maven project: Unable to locate the Javac Compiler
Dave Alvarado
Ranch Hand
Joined: Jul 02, 2008
Posts: 434
posted
0
Hi,
I'm using Eclipse Indigo on Win XP, Maven 3.0.3 and I have just built a Maven-GWT project using GWT 2.4 and the gwt-maven-plugin. Despite the fact that I have pointed my Eclipse JDK to what I have installed -- http://screencast.com/t/7TYkFh8rcObL, I'm still getting this error when I right click on my project and select the "Maven Install" option ...
I verified through the Windows start menu -> Run, "cmd" window that %JAVA_HOME% is set properly. What other settings do I need to adjust to eliminate the above error?
You can see it here -- http://screencast.com/t/ON65FsgGp . I verified this path exists by going to the Start Menu, selecting "Run", entering "cmd" and then doing "cd %JAVA_HOME%" at the command prompt, which successfully changes the current working directory.
you should select the jre instead of jdk under Installed JREs option and check the compiler option in same java tree.
and verify the right compiler within JDK Compliance.
You should put the bin directory of your JDK installation directory in the PATH; not the JDK installation directory itself. So this must be included in your PATH:
Note: I'm talking about the PATH environment variable, not the JAVA_HOME environment variable.
I tried switching to the JRE you recommended. Also, my compiler is set to 1.6 (http://screencast.com/t/kKGB6b8IEkPW), but I got the same result as before, right-clicking on my project, seleting Run As -> Maven Install. But why would I move away from a Java installation that had javac? The error is complaining about not being able to find javac, so how do I tell the Maven-Eclipse plugin where to find it?
Jasper,
If you looked at the screen shot I sent, the thing I cut and pasted was actually my JAVA_HOME. I mistyped "path" in the previous post. My environment variables %PATH% is set to
What is the relationship between the %PATH% and %JAVA_HOME% env.vars and what the Maven Eclipse plugin uses to execute Maven commands? - Dave