Apache Maven 安装问题

Apache maven installation issue

我已经在 XP 上安装了 Maven 3.3.1 - 它似乎运行良好。
但是,当我之后执行 mvn --version 时 - 我得到以下奇怪的响应:

C:\>mvn --version
Usage: java [-options] class [args...]
           (to execute a class)
   or  java [-options] -jar jarfile [args...]
           (to execute a jar file)

where options include:
    -client       to select the "client" VM
    -server       to select the "server" VM
    -hotspot      is a synonym for the "client" VM  [deprecated]
                  The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
                  A ; separated list of directories, JAR archives,
                  and ZIP archives to search for class files.
    -D<name>=<value>
                  set a system property
    -verbose[:class|gc|jni]
                  enable verbose output
    -version      print product version and exit
    -version:<value>
                  require the specified version to run
......

希望能帮助解决这个问题。

Maven 命令文件使用参数运行 JVM。你有什么 java 版本? JDK Maven 3.3 需要 JDK 1.7 或 以上,Maven 3.2 需要 JDK 1.6 或以上,而Maven 3.0/3.1 需要 JDK 1.5 或更高