Quantcast
Viewing all articles
Browse latest Browse all 7

I get “Unable to locate the Javac Compiler” when trying to build using IAM Maven Eclipse plugin.

Problem:
When trying to build maven project using IAM under Eclipse I get an error like this:

"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"

,nevertheless I have proper installation of newest Java JDK and JAVA_HOME is properly set.
The problem never occured before.

Solution:

I know two possible causes of that problem:

1. Eclipse uses its own JRE to start, and IAM does the same. You’ve recently installed a new maven plugin and it requires JDK.
You can force Eclipse to start using directly given Java VM by starting it that way from command line:

“X:\\path\to\\eclipse\\eclipse.exe -vm JAVA_JDK_PATH”

2. There also cases when IAM brokes up without apparent cause, and that happend to me.
The reason may be IAM itself.
Try standard tricks checklist from my another post here:
Problems using Eclipse IAM and Maven


Viewing all articles
Browse latest Browse all 7

Trending Articles