Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

source isn't updating with new JDK

$
0
0

I recently installed IntelliJ so I'm still really new to it. When I installed it I had JDK 1.6 (x86) installed. But I ran into issue when compiling some code that had a switch statement with a string as it's only valid in JDK 7+.

 

So I installed JDK 1.7 (x64), chose it as a project sdk, and tried to compile the same code but got this error.

 

Error:(39, 15) java: strings in switch are not supported in -source 1.6

  (use -source 7 or higher to enable strings in switch)

 

I then installed JDK 1.8 (x64), chose it as a the project sdk, and tried to compile the same code. Still received the same error.

 

Here's the Path envieronment variable.

 

C:\ProgramData\Oracle\Java\javapath;

 

Here's the java version from the command line

 

command line> java -version

java version "1.8.0_25"

Java(TM) SE Runtime Environment (build 1.8.0_25-b18)

Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

 

Any idea how to fix my compile error?


Viewing all articles
Browse latest Browse all 5661

Trending Articles