0

I have installed the Maven apache-maven-3.3.9 binaries on Windows 10 and have set below variable as :

M2_HOME: 
C:\Program Files\apache-maven-3.3.9

M2: %M2_HOME%\bin

MAVEN_OPTS: Xms256m -Xmx512m

PATH: C:\Program Files\Java\jdk1.8.0_92\bin;%M2%

But when I run mvn -v in CMD, I get this error:

Error: Could not find or load main class Xms256m

I have already tried solution listed on this link

Community
  • 1
  • 1
ShiwamP
  • 5
  • 4
  • 1
    in the `MAVEN_OPTS` here above, did you miss an initial `-` while typing the question or effectively in your system? – A_Di-Matteo Aug 27 '16 at 19:21

1 Answers1

1

You have invalid environment variable MAVEN_OPTS (missing dash). It should be

-Xmx256m -Xmx512m
vsminkov
  • 10,912
  • 2
  • 38
  • 50