[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17486811#comment-17486811 ] Arnaud Kleinveld commented on NETBEANS-6345: There is a problem with the JDK1.8 bootstrap class not being added by Netbeans to the Ant compiling target arguments. As a workaround I have now set Additional Compiler Options -bootclasspath /usr/lib/jvm/java-1.8.0-openjdk/jre/lib/rt.jar > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > Fix For: 12.6 > > Attachments: image-2021-12-31-22-09-29-276.png, > image-2021-12-31-22-16-08-793.png, image-2022-01-02-17-31-29-854.png, > image-2022-01-02-17-32-37-672.png, image-2022-01-02-17-34-04-610.png, > image-2022-01-22-16-53-54-699.png, image-2022-01-22-16-55-06-306.png, > image-2022-01-22-16-55-12-036.png, image-2022-01-22-17-00-02-872.png > > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17480407#comment-17480407 ] Arnaud Kleinveld commented on NETBEANS-6345: Tried your ant suggestions but at no avail. Then I enable debug verbosity level in the java/ant section of Netbeans options. !image-2022-01-22-16-53-54-699.png|width=533,height=349! This generated a lot of output and I see Ant detecting JDK 11. Which is the Netbeans JRE it also runs Ant on I guess. {quote}Detected Java version: 11 in: /usr/lib/jvm/java-11-openjdk-11.0.13.0.8-2.fc34.x86_64 {quote} This is further a grep of javac on the produced output. {quote}Setting project property: javac.debug -> true Setting project property: default.javac.source -> 11 Setting project property: default.javac.target -> 11 Override ignored for property "default.javac.source" Override ignored for property "default.javac.target" Setting project property: javac.test.classpath -> :build/jar:/usr/local/netbeans-12.6/netbeans/platform/modules/ext/junit-4.13.2.jar:/usr/local/netbeans-12.6/netbeans/platform/modules/ext/hamcrest-core-1.3.jar Setting project property: javac.processorpath -> Setting project property: javac.compilerargs -> Setting project property: javac.source -> 1.8 Setting project property: javac.deprecation -> false Override ignored for property "javac.debug" Setting project property: javac.classpath -> Setting project property: javac.target -> 1.8 Setting project property: javac.test.processorpath -> :build/jar:/usr/local/netbeans-12.6/netbeans/platform/modules/ext/junit-4.13.2.jar:/usr/local/netbeans-12.6/netbeans/platform/modules/ext/hamcrest-core-1.3.jar Property "platforms.JDK_1.8.javac" has not been set Setting project property: platform.javac.tmp -> ${platforms.JDK_1.8.javac} Condition true; setting platform.javac to /usr/lib/jvm/java-1.8.0-openjdk/bin/javac Setting project property: platform.javac -> /usr/lib/jvm/java-1.8.0-openjdk/bin/javac Override ignored for property "platform.javac" Setting project property: javac.fork -> false Override ignored for property "javac.processorpath" Override ignored for property "javac.test.processorpath" -init-macrodef-javac-with-processors: +Datatype http://www.netbeans.org/ns/j2ee-ejbjarproject/2:javac org.apache.tools.ant.taskdefs.MacroInstance creating macro http://www.netbeans.org/ns/j2ee-ejbjarproject/2:javac -init-macrodef-javac-without-processors: -init-macrodef-javac: Override ignored for property "javac.compilerargs" {quote} Everything seems to been have set correctly and I fail to find the java configuration that worked before. If I remember well it was Netbeans running on 1.8 which would fix this compiling issue but introducing new errors as 1.8 is no longer support with Netbeans 12.6. > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > Fix For: 12.6 > > Attachments: image-2021-12-31-22-09-29-276.png, > image-2021-12-31-22-16-08-793.png, image-2022-01-02-17-31-29-854.png, > image-2022-01-02-17-32-37-672.png, image-2022-01-02-17-34-04-610.png, > image-2022-01-22-16-53-54-699.png, image-2022-01-22-16-55-06-306.png, > image-2022-01-22-16-55-12-036.png, image-2022-01-22-17-00-02-872.png > > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476907#comment-17476907 ] Thomas Schapitz commented on NETBEANS-6345: --- The line {{ warning: [options] bootstrap class path not set in conjunction with -source nnn}} is indeed a hint issued by the compiler, telling you that the JDK used for compiling is not JDK 1.8. So what ever JDK you use for running Netbeans, if you want to build for JDK 8, it's easiest (if not best) to use JDK 8 to compile - which you would do as described above in the project properties. If you are unsure, what is happening there, and familiar with ant, you may use . $HOME/.ant/ant.conf or . "$HOME/.antrc" to get some debugging information. If none of it exists, create one of it. Add the line: $ANT_OPTS="$ANT_OPTS -XshowSettings" This would cause the java command within the ant start script to dump its initial settings to the console, so you may see, what is happening there. > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > Fix For: 12.6 > > Attachments: image-2021-12-31-22-09-29-276.png, > image-2021-12-31-22-16-08-793.png, image-2022-01-02-17-31-29-854.png, > image-2022-01-02-17-32-37-672.png, image-2022-01-02-17-34-04-610.png > > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17476678#comment-17476678 ] Arnaud Kleinveld commented on NETBEANS-6345: Hi Thomas, the issue has resurfaced again and I'm not exactly sure what has caused this to happen. Compiling 428 source files to -ejb/build/jar warning: [options] bootstrap class path not set in conjunction with -source 8 /core/MailQueue.java:269: error: cannot access DataSource Multipart mp = new MimeMultipart("alternative"); class file for javax.activation.DataSource not found Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error 1 warning BUILD FAILED (total time: 11 seconds) What I know is that I was trying to resolve other errors related to classpath and I switched to Glassfish from having no server configured at all, i.e. according to the project properties UI, however when I removed Glassfish from the Netbeans server configuration the project had a missing server and prompted me to select another where I could choose Tomcat. if I open the /nbproject/project.properties I also see j2ee.server.type=Tomcat. which was also the original setting before I tried Glassfish confirmed by git versioning. Now I could go through the same steps again like previously which may resolve this case again. Not entirely sure if I recollect the exact steps but it was switching Netbeans default platform JDK 11 back to JDK 1.8 which is no longer supported with latest version of Netbeans (12.6) I have been told in another support ticket. Before I try to resolve it the same way I thought to report this once more to you if you feel like looking into this. Can not reproduce this problem with a new Ant EJB module project so it likely has something to do with inherited project properties from an earlier Netbeans version. > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Assignee: Arnaud Kleinveld >Priority: Minor > Fix For: 12.6 > > Attachments: image-2021-12-31-22-09-29-276.png, > image-2021-12-31-22-16-08-793.png, image-2022-01-02-17-31-29-854.png, > image-2022-01-02-17-32-37-672.png, image-2022-01-02-17-34-04-610.png > > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467589#comment-17467589 ] Arnaud Kleinveld commented on NETBEANS-6345: Thank you Thomas for taking the time to respond extensively. Indeed I explored the options of command line parameter and netbeans.conf setting of jdkhome. However project level selection is preferred. Also indeed as your screenshots I have selected the 1.8 platform for this particular project. "{_}Also note, that Netbeans will take care of selecting the proper JDK when executing the build only{_}" - This is where it goes wrong. It does select the 1.8 compiler but does not include the 1.8 libraries int the classpath for the build. That while the classes are listed under the project libraries node in the navigator. !image-2022-01-02-17-31-29-854.png! !image-2022-01-02-17-32-37-672.png! The editor inline compiler is using this correctly and the specific line has not been badged. !image-2022-01-02-17-34-04-610.png! Here comes the cracker. Now that I want to include a screenshot of a failing built after hitting F11, this time around the build completes successfully. It's magic! Happy new year and all the best for you and your loved ones. > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > Attachments: image-2021-12-31-22-09-29-276.png, > image-2021-12-31-22-16-08-793.png, image-2022-01-02-17-31-29-854.png, > image-2022-01-02-17-32-37-672.png, image-2022-01-02-17-34-04-610.png > > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467311#comment-17467311 ] Thomas Schapitz commented on NETBEANS-6345: --- The Answer to this is, that you need to select this independently, and indeed you can. 1.) You may fix the JDK Netbeans is running on without relying on OS paths and settings, basically in two ways: * Using the parameter --jdkhome when starting netbeans on a command line *OR* * Within the Netbeans installation directory, edit the file etc/netbenans.conf: uncomment and change the value of netbeans_jdkhome="/path/to/jdk" to point to the JDK, that you would like to be used fro Netbeans itself. Note: if you use both, the command line will take precedence. You may also compile a couple of Desktop shortcuts wit a variety of different --jdkhome Parameters, so you may select them per click, instead of constantly editing the configuration. But basically, you rarely need this, if proceed to step two: 2.) Now start Netbeans with your selected JDK, and navigate to -> Tools -> Java Plattform Manager. You will notice, that the JDK you just selected usually appears to be registered as the single "Default", at least if you started with an pristine installation. You may now add here any other JDK, that you want to use for development. This might look something like this: !image-2021-12-31-22-09-29-276.png! 3.) Throught Netbeans, there are several opportunities were you might pick one of those JDKs as the one, that should be used for buildung, testing, or executing your code. For Ant Projects the relevant location is in the projects properties, available in the context menu of the project within the 'Libraries' category: !image-2021-12-31-22-16-08-793.png! Note, that you may select a matching source/binary version independently in category 'Sources', but usually it is safest, if the matches the JDK. Also note, that Netbeans will take care of selecting the proper JDK when executing the build only, if start from one of the Netbeans menu items. If you start Ant from the command line, you have to take care of it yourself again. If this explanation helps, I suggest that you close this issue. > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > Attachments: image-2021-12-31-22-09-29-276.png, > image-2021-12-31-22-16-08-793.png > > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467138#comment-17467138 ] Arnaud Kleinveld commented on NETBEANS-6345: For this particular project I am using Ant and there is also a section under Tools/Options for Ant but that would be a global setting which I am trying to avoid. When I was working with one java platform version I did not have this problem and currently I work around the problem running Netbeans on the same version as the project, using command line alternatives. Works for me, yet I thought to report this issue because I understand that Netbeans was designed to accept project level platform selection and that the build tool would include the selected platform libraries in the compiler classpath. The inline compiler is doing this as expected because there is no error badge. However once I hit the build button and the Ant compile target runs it reports an error for a missing class. Note that I can expand the libraries node from the project tree and further expand into JDK 1.8 and rt.jar where the missing class is listed. > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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
[jira] [Commented] (NETBEANS-6345) Project platform libraries missing from project compiler classpath
[ https://issues.apache.org/jira/browse/NETBEANS-6345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17467082#comment-17467082 ] Thomas Schapitz commented on NETBEANS-6345: --- What Build Tool are you using? If it is maven, you might want to take a look at: Tools -> Options -> Tab Java -> Tab Maven -> Category: Execution -> Default JDK > Project platform libraries missing from project compiler classpath > -- > > Key: NETBEANS-6345 > URL: https://issues.apache.org/jira/browse/NETBEANS-6345 > Project: NetBeans > Issue Type: Bug > Components: java - Compiler >Affects Versions: 12.6 >Reporter: Arnaud Kleinveld >Priority: Minor > > Configuration of Fedora 34 with java 11 and 1.8 from repo and used > alternatives set to java 11 as the default. When Netbeans is launched on > selected version and project platform is specified to be 1.8, the project > libraries node expands with JDK 1.8 and inline compiler is using this > correctly, however when the project is built 1.8 specific libraries seem to > be missing from classpath, e.g. javax.activation.DataSource. -- 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