When running Maven, I get this output:
[WARNING] Unable to autodetect 'javac' path, using 'javac' from the environment.
How do I fix this?
You will see this error message when Maven is being run using a JRE (Java Runtime Environment) which is a stripped down version of Java that can only execute Java code but can't compile sources.
To fix the warning, install the JDK (Java Development Kit) and set the environment variable JAVA_HOME
to the newly installed version of Java.
You can put this into the file .mavenrc
if you want; then only Maven will use this version of Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With