Maven is creating problems for me showing - The JAVA_HOME environment variable is not defined correctly This environment variable is needed to run this program NB: JAVA_HOME should point to a JDK not a JRE
This error came up when I updated the .mavenrc with JAVA_HOME - mavenrc content - export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_331.jdk/Contents/Home/bin/java
my 'which java' showing - /Library/Java/JavaVirtualMachines/jdk1.8.0_331.jdk/Contents/Home/bin/java
Before updating the mavenrc file. when I was trying to do mvn package - showing - Could not find artifact com.sun:tools:jar:0 at specified path /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/../lib/tools.jar
I don't know what is the issue here. But m stuck and need help.