所以我一直在尝试编译我的代码,我收到以下错误:
Information:Using javac 1.7.0_80-ea to compile java sources
Information:java: Errors occurred while compiling module 'DataRegistry'
Information:4/8/15, 9:48 AM - Compilation completed with 14 errors and 0 warnings in 2 sec
/Users/jvy234/Documents/workspace/dataregistry/src/main/java/com/capitalone/hub/registry/controller/SandboxController.java
Error:(169, 43) java: diamond operator is not supported in -source 1.6
(use -source 7 or higher to enable diamond operator)
我手动将CurrentSDK符号链接强制转换为java 1.7:
6003088f811e:~ jvy234$ which java
/usr/bin/java
6003088f811e:~ jvy234$ ls -ltr /usr/bin/java
lrwxr-xr-x 1 root wheel 74 Jan 21 09:52 /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java
6003088f811e:~ jvy234$ ls -ltr /System/Library/Frameworks/JavaVM.framework/Versions/
total 64
lrwxr-xr-x 1 root wheel 10 Jan 21 09:52 1.6.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jan 21 09:52 1.6 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jan 21 09:52 1.5.0 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jan 21 09:52 1.5 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jan 21 09:52 1.4.2 -> CurrentJDK
lrwxr-xr-x 1 root wheel 10 Jan 21 09:52 1.4 -> CurrentJDK
lrwxr-xr-x 1 root wheel 1 Jan 21 09:52 Current -> A
drwxr-xr-x 7 root wheel 238 Jan 21 09:52 A
lrwxr-xr-x 1 root wheel 59 Apr 8 09:43 CurrentJDK -> /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/
当我转到Java的Preferences面板时,我看到安装了Java 1.7_80。我该怎么做才能使它使用JDK 1.7?