How to fix java language level error in netbeans

852 views Asked by At

How can I fix these java language level error which shows:

use -source 7 or higher to enable strings in switch

I am using netbeans as an IDE.

1

There are 1 answers

0
Daniil On

With right mouse click on a project name open pop-up menu and choose "Properties". There will be project properties window opened. Choose category "Sources" and change field "Source/Binary Format":

Netbeans Project Properties

If you have several JVM versions installed, choose the necessary version under "Build/Compile":

enter image description here