Saturday, September 8, 2012

Eclipse complains about com.sun.tools 1.5.0 is missing

During compilation of some opensource project you could come up to error "artifact  com.sun.tools 1.5.0 is missing" in Eclipse, but compilation works fine from terminal.

Problem is in what JDK Eclipse use and provide it the same path.
check correctness of $JAVA_HOME
You need to check $PATH variable to be sure that required JDK is in Path.
Even you have JAVA_HOME/bin in path, java could be taken from other location due to the fact that it could be found in path early than your, to check it:
which java
ls -la /usr/bin/java
ls -la /etc/alternatives/java
Make sure that /etc/alternatives/java points to your JDK. In my case it was to OpenJDK but my JAVA_HOME was pointed JDK 1.6. So I removed all openjdk packages from Synaptic in Ubuntu and  after that all worked fine.

Similar problem is described here.


No comments:

Post a Comment