Reputation: 800
I installed the latest version of Anypoint Studio (based on Eclipse) and created a new maven enabled project. I got the following error as maven tried to resolve all of it's dependencies:
[ERROR] Unresolveable build extension: Plugin org.mule.tools.maven:mule-app-maven-plugin:1.1 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.5.0 at specified path C:\Program Files\Java\jre1.8.0_65/../lib/tools.jar -> [Help 2]
I have JDK 1.8 installed on the system, and have my PATH and JAVA_HOME environmental variables set.
Why is it looking in the incorrect location for the library?
Upvotes: 2
Views: 3558
Reputation: 800
It turned out that by default Anypoint Studio was pointing to the JRE rather than the JDK. This lead to it not being able to locate tools.jar.
First thing I did was I added the JDK by searching for it in the Java directory. Open Window -> Preferences -> Java -> Installed JREs, Click search, then navigate to your JDK. Once the JDK is added to the list, select it as the default run-time:
Go to your project properties -> Java Build PAth -> Libraries. Remove the current JRE system library and click Add Library, search for your JDK under the list of installed JDKs.
Upvotes: 6