You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Stephen Bannasch (Jira)" <ji...@apache.org> on 2020/01/02 03:00:00 UTC

[jira] [Commented] (NETBEANS-3655) NB-Javac linkage error with JDK 14, can't generate class file version 58.65535

    [ https://issues.apache.org/jira/browse/NETBEANS-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17006547#comment-17006547 ] 

Stephen Bannasch commented on NETBEANS-3655:
--------------------------------------------

Am doing a great deal of development using JDK 14 and NetBeans. So far this is the only issue that rose the level that I thought it was worth reporting – so while it may not be official supported NetBeans 11.2 certainly operates quite well with JDK 14.

The issue with nb-javac generating the older class file version might be easy to fix – haven't looked into it yet.

 

Be useful to know when in the future this might be working. Right now the integration with the macos version of NB 11.2 is relatively opaque. It was installed on clicking a link in theNotifications panel and at this point is not listed as a plugin or anywhere else in the GUI part of the application – which means it's hard to extract the version info for nb-javac. Might be useful to display version info for it in the Environment section of the About dialog.. Am assuming it got installed into the app itself. Obviously not easy to uninstall either.

 

> NB-Javac linkage error with JDK 14, can't generate class file version 58.65535
> ------------------------------------------------------------------------------
>
>                 Key: NETBEANS-3655
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3655
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 11.2
>         Environment: 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.2
>            Reporter: Stephen Bannasch
>            Priority: Major
>              Labels: jdk14, nbjavac
>
> Using NB 11.2 on macos 10.15.2 and am using JEP 354: Switch Expressions so am compiling with JDK 14.
> {noformat}
> 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)
> {noformat}
>  
>  Am also setting these additional compiler options in the NB project:
> {noformat}
> --enable-preview --source 14 -Xlint:unchecked -Xlint:preview
> {noformat}
> 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.
> {noformat}
> 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)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists