Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Information Provided
-
11.2
-
None
-
None
-
Product Version: Apache NetBeans IDE 11.2
Java: 14-ea; OpenJDK 64-Bit Server VM 14-ea+29-1384
Runtime: OpenJDK Runtime Environment 14-ea+29-1384
System: Mac OS X version 10.15.2 running on x86_64; UTF-8; en_US (nb)
User directory: /Users/stephen/Library/Application Support/NetBeans/11.2
Cache directory: /Users/stephen/Library/Caches/NetBeans/11.2Product Version: Apache NetBeans IDE 11.2 Java: 14-ea; OpenJDK 64-Bit Server VM 14-ea+29-1384 Runtime: OpenJDK Runtime Environment 14-ea+29-1384 System: Mac OS X version 10.15.2 running on x86_64; UTF-8; en_US (nb) User directory: /Users/stephen/Library/Application Support/NetBeans/11.2 Cache directory: /Users/stephen/Library/Caches/NetBeans/11.2
Description
Using NB 11.2 on macos 10.15.2 and am using JEP 354: Switch Expressions so am compiling with JDK 14.
openjdk 14-ea 2020-03-17 OpenJDK Runtime Environment (build 14-ea+29-1384) OpenJDK 64-Bit Server VM (build 14-ea+29-1384, mixed mode, sharing)
Am also setting these additional compiler options in the NB project:
--enable-preview --source 14 -Xlint:unchecked -Xlint:preview
Installed nb-javac today to see if I could get "Compile on save" working.
With "Compile on save" disabled I need to manually build the project every time I want to test changes.
With "Compile on save" enabled I get this error when running the project.
Error: LinkageError occurred while loading main class GraphPanel.GraphDemo java.lang.UnsupportedClassVersionError: GraphPanel/GraphDemo (class file version 57.65535) was compiled with preview features that are unsupported. This version of the Java Runtime only recognizes preview features for class file version 58.65535 /Users/stephen/Library/Caches/NetBeans/11.2/executor-snippets/run.xml:111: The following error occurred while executing this line: /Users/stephen/Library/Caches/NetBeans/11.2/executor-snippets/run.xml:68: Java returned: 1 BUILD FAILED (total time: 0 seconds)