0
votes

I've installed maven on windows 7 using the windows environment IHM with :

M2_HOME : C:\dev\outils\maven

and

PATH : %JAVA_HOME\bin;%M2_HOME\bin;...

java -version works fine

java version "1.8.0_45" Java(TM) SE Runtime Environment (build 1.8.0_45-b15) Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

but mvn -version is not working : I get the french equivalent to :

'mvn' is not recognised as an external or internal command, operableprgram or batch file

which is :

'mvn' n'est pas reconnu en tant que commande interne ou externe, un programme exécutable ou un fichier de commandes.

but mvn works :

C:\Users\jerome>%M2_HOME%\bin\mvn --version

result :

Apache Maven 3.3.3 ... Maven home: C:\dev\outils\maven Java version: 1.8.0_45, vendor: Oracle Corporation Java home: C:\dev\outils\Java Default locale: fr_FR, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"

I've restarted the PC but it doesn't work better. Any idea?

1

1 Answers

4
votes

YOu need to close the % in the path.

PATH : %JAVA_HOME%\bin;%M2_HOME%\bin;...

instead of

PATH : %JAVA_HOME\bin;%M2_HOME\bin;...