2014-07-03 84 views
1

我升級到Java 8從Java 6的IntelliJ調試器無法識別的Java版本升級

these instructions,在/Applications/IntelliJ IDEA 13 CE.app/Contents/Info.plist我改變

<key>JVMVersion</key> 
<string>1.6*</string> 

<key>JVMVersion</key> 
<string>1.8*</string> 

我的環境變量JAVA_HOME設置爲:

/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home 

然而,當我運行的IntelliJ調試器,它仍然要使用Java 6:

/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java ... 
Connected to the target VM, address: '127.0.0.1:60490', transport: 'socket' 
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/my/MainClass : Unsupported major.minor version 52.0 
    at java.lang.ClassLoader.defineClass1(Native Method) 
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637) 
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621) 

我需要什麼其他設置,以改變的IntelliJ使用Java JRE 8?

回答

2

您更改了IDE的設置。項目設置可在此更改:File->ProjectStructure->Project SDK