[ https://issues.apache.org/jira/browse/NETBEANS-6285?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17469687#comment-17469687 ]
Jaroslav Tulach commented on NETBEANS-6285: ------------------------------------------- I've just built recent NetBeans: {code} netbeans$ git log | head -n 1 commit 76183f342a62d9f0e6732d7b500430d34d813b54 netbeans$ JAVA_HOME=/jdk-11/ ant build {code} and then verified whether the classfiles are correct using the [ValidateClassFilesTest introduced by PR-2761|https://github.com/apache/netbeans/pull/2761]: {code} netbeans$ ant -f platform/o.n.core/ -Dtest.type=qa-functional test-single -Dtest.includes=**/ValidateClassFilesTest* {code} they are - e.g. they all shall have [major classpath version 52|https://stackoverflow.com/questions/9170832/list-of-java-class-file-format-major-version-numbers] and thus be targetted for JDK8. The same applies to {{org.netbeans.modules.java.source.parsing.FileObjects}}: {code} netbeans$ cd nbbuild nbbuild$ javap -v -c -cp netbeans/java/modules/org-netbeans-modules-java-source-base.jar org/netbeans/modules/java/source/parsing/FileObjects | head -n7 Classfile jar:file:/netbeans/java/modules/org-netbeans-modules-java-source-base.jar!/org/netbeans/modules/java/source/parsing/FileObjects.class Last modified 6.1.2022; size 29135 bytes MD5 checksum 8b8fe1fd32aa92135598fe1947a5c420 Compiled from "FileObjects.java" public class org.netbeans.modules.java.source.parsing.FileObjects minor version: 0 major version: 52 {code} however, there is really a call to {{CharBuffer.flip()}}: {code} nbbuild$ javap -c -cp netbeans/java/modules/org-netbeans-modules-java-source-base.jar org/netbeans/modules/java/source/parsing/FileObjects | grep flip -C3 132: invokevirtual #75 // Method java/nio/CharBuffer.append:(Ljava/lang/CharSequence;)Ljava/nio/CharBuffer; 135: bipush 32 137: invokevirtual #76 // Method java/nio/CharBuffer.append:(C)Ljava/nio/CharBuffer; 140: invokevirtual #77 // Method java/nio/CharBuffer.flip:()Ljava/nio/CharBuffer; 143: invokespecial #73 // Method org/netbeans/modules/java/source/parsing/FileObjects$MemoryFileObject."<init>":(Ljava/lang/String;Ljava/lang/String;Ljava/net/URI;JLjava/nio/CharBuffer;)V 146: areturn {code} this is caused by nb-javac passing bootclasspath option when compiling the module and thus disabling usage of {{--release}}: {code} netbeans$ JAVA_HOME=~/bin/jdk-11 ant -f java/java.source.base/ -v build | grep -- -X.*bootclasspath [nb-javac] '-Xbootclasspath/p:/home/devel/NetBeansProjects/netbeans/java/libs.javacapi/external/nb-javac-jdk-17.0.1-ga-api.jar:/home/devel/NetBeansProjects/netbeans/java/libs.javacapi/external/nb-javac-jdk-17.0.1-ga.jar' {code} > Netbeans 12.6 seems no properly run on JDK 8 > -------------------------------------------- > > Key: NETBEANS-6285 > URL: https://issues.apache.org/jira/browse/NETBEANS-6285 > Project: NetBeans > Issue Type: Bug > Components: java - Platform > Affects Versions: 12.6 > Reporter: Jean-Marc Borer > Assignee: Jaroslav Tulach > Priority: Major > Attachments: messages.log > > > After a full fresh install of NB12.6 and trying to run with Azul Open JDK 1.8 > 312, there are several ClassNotFoundExceptions in the logs. It seems that NB > looks for missing methods that make NB not longer properly. For example, it > is no longer possible to properly format Java sources files due to a > java/nio/CharBuffer method missing. > Is NB platform supposed to no longer work with Java 8? -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists