Generally on "-source 7": use JDK7
(For example, if you usually use JDK 6 and just want to use JDK 7 for a special project, etc.)
If you still have a problem using a different Netbeans JDK, the following steps may help.
First, install the JDK in any directory; it should not be your main JDK or entered in any PATHS or so.
All these steps should be considered.
In Netbeans, right click on the project -> Properties
- → Libraries → Platform Management ... → Add Platform ... and Add JDK Directory
- → Libraries → Java Platform: Select JDK 7
- -> Sources -> Source / Binary Format: select JDK 7
user905686
source share