Intellij Ultimate: "tools.jar not found" when using Maven and JDK 10

Answered

Hi,

I'm running into a problem with compiling a Maven project with JDK 10. I always get the following error:

Fatal error compiling: tools.jar not found: C:\Program Files\Java\jdk-10.0.1\..\lib\tools.jar 

Interestingly, it works when I run Maven via the command line (with the following settings):

Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: C:\Users\...\Development\apache-maven-3.3.9
Java version: 10.0.1, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk-10.0.1
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

I've tried updating Maven to 3.5.4, invalidating the caches, deleting the .iml project file and re-importing the project as a Maven project, using a newer version of Intellij (currently: 2018.2.4), to no avail.

0
2 comments

Can you share your sample project? What maven-compiler-plugin version is used in the build script?

0
Avatar
Permanently deleted user

I deleted my entire configuration (.IntelliJIdea2018.2 folder) and now it works. So something in my configuration must have been wrong.

I've made a backup of my previous configuration so now I'll try to import some settings and see if it fails again.

0

Please sign in to leave a comment.