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

[jira] [Comment Edited] (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 edited comment on NETBEANS-6345 at 2/1/22, 11:20 PM:
----------------------------------------------------------------------

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 supported with Netbeans 12.6.


was (Author: JIRAUSER282855):
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-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