运行maven命令mvn --version
时出现以下异常mvn --version
Exception in thread "main" java.lang.NoClassDefFoundError: Xms256m
Caused by: java.lang.ClassNotFoundException: Xms256m
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: Xms256m. Program will exit.
'cmd' is not recognized as an internal or external command,
operable program or batch file.
可能是什么原因。 我已经设置了以下maven环境变量
M2_HOME
M2
MAVEN_OPTS