Answers for "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 'cmd' is not recognized as an internal or external command, operable program or batch file."

1

JAVA_HOME should point to a JDK not a JRE

C:\Users>echo %PROGRAMFILES%
C:\Program Files

C:\Program Files>set JAVA_HOME=%PROGRAMFILES%\Java\jdk-11.0.2

C:\Program Files>echo %JAVA_HOME%
C:\Program Files\Java\jdk-11.0.2

C:\Program Files>mvn -version
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T17:06:16+02:00)
Maven home: C:\apache-maven-3.6.2\bin\..
Java version: 11.0.2, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11.0.2
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Posted by: Guest on August-21-2020

Code answers related to "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 'cmd' is not recognized as an internal or external command, operable program or batch file."

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language