title: VSC Cannot switch on a value of type String for source level below 1.7
body: <p>I have an error in my code because I am using a String like a Switch case:</p>
  
  <pre><code>private static void setNumberValues(Employee emp, Address address,
          String keyName, long value, List&lt;Long&gt; phoneNums) {
      switch(keyName){
      case "zipcode":
          address.setZipcode((int)value);
          break;
      case "id":
          emp.setId((int) value);
          break;
      case "phoneNumbers":
          phoneNums.add(value);
          break;
      default:
          System.out.println("Unknown element with key="+keyName);    
      }
  }
  </code></pre>
  
  <p>I am facing this error in Visual Studio Code with the Red Hat Java extension. </p>
  
  <p>I know what the error means so, here is my environment:</p>
  
  <p><em>My jdk version:</em> </p>
  
  <pre><code>    /usr/libexec/java_home -V
      Matching Java Virtual Machines (1):
      1.8.0_131, x86_64:  "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
  
      /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
  </code></pre>
  
  <p><em>My Visual Studio Code java.home settings:</em></p>
  
  <pre><code>"java.home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home"
  </code></pre>
  
  <p>How to tell VSC to compile with my jdk 1.8 and don't bother with old java 1.6 ?</p>
  
  <p>Regards,</p>
  
  <p>S.</p>