Oracle在4月26日针对Mac OS X发布了Java JDK7。我按照安装说明进行操作,在终端窗口中执行java -version时,我得到:
java version "1.7.0_04"
Java(TM) SE Runtime Environment (build 1.7.0_04-b21)
Java HotSpot(TM) 64-Bit Server VM (build 23.0-b21, mixed mode)
但是,当我mvn -version
在终端窗口中执行操作时,会得到:
Apache Maven 3.0.2 (r1056850; 2011-01-08 18:58:10-0600)
Java version: 1.6.0_31, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.3", arch: "x86_64", family: "mac"
如何使Maven使用Java JDK 1.7.0_04?
谢谢您的帮助。