How do you fix the missing 'javadoc' command issue when calling maven from IntelliJ?

Viewed 5987

I keep getting this when calling maven install from IntelliJ:

Error while creating archive: Unable to find javadoc command: The environment variable JAVA_HOME is not correctly set.

I can run maven-install just fine from the terminal inside of my working directory, but does anyone know how to get this to actually work in IntelliJ?

4 Answers

Ensuring that my IntelliJ -> Settings -> Build, Execution, Deployment -> Build Tools -> Maven -> Runner settings indicated a JDK rather than only a JRE, as helps some, did not help me (for IntelliJ IDEA 2021.1.2 Community Edition on Ubuntu 20.04).

I found I also had to tell the Maven Runner to use a JAVA_HOME environment variable explicitly set to the JDK location.

Related