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

Eric Bresie commented on NETBEANS-3278:
---------------------------------------

So digging a little more, I noticed some minor differences between the above 
jdk.xml files.  Do these maybe need to be made similar?

 

More specifically, in the following versions:
 * 
.\netbeans\nbbuild\nbproject\jdk.xmlC:\src\git\netbeans.eric\netbeans\nbbuild\nbproject\jdk.xml
 * 
.\netbeans\java\java.freeform\src\org\netbeans\modules\java\freeform\jdkselection\jdk.xml

These only includes condition and checks for nbjdk.home, nbjdk.javac, 
nbjdk.java, and jbjdk.javadoc

However in these other two jdk.xml file, they are slightly different
 * .\netbeans\nbbuild\netbeans\harness\jdk.xml

Which includes nbjdk.home, nbjdk.javac, nbjdk.java, and jbjdk.javadoc  but also 
includes an "or" expression like the following:
               <or>                    <available classname="java.lang.Object" 
classpath="${nbjdk.bootclasspath}" ignoresystemclasses="true"/>                 
   <available file="${nbjdk.home}/bin/jmod${.exe}"/>                </or>

Assume this is to check if jdk 9's jmod (for modularity) is available for use

Further in this version, it has those of the above plus
 * .\netbeans\nbbuild\jdk.xml

Also includes "have-jdk-xxxx" available items like:

 <available property="have-jdk-1.4" classname="java.lang.CharSequence" 
classpath="${nbjdk.bootclasspath}" ignoresystemclasses="true"/>
 <available property="have-jdk-1.5" classname="java.lang.StringBuilder" 
classpath="${nbjdk.bootclasspath}" ignoresystemclasses="true"/>
 <available property="have-jdk-1.6" classname="java.util.ServiceLoader" 
classpath="${nbjdk.bootclasspath}" ignoresystemclasses="true"/>
 <available property="have-jdk-1.7" 
classname="java.lang.ReflectiveOperationException" 
classpath="${nbjdk.bootclasspath}" ignoresystemclasses="true"/>
 <available property="have-jdk-1.8" classname="java.lang.FunctionalInterface" 
classpath="${nbjdk.bootclasspath}" ignoresystemclasses="true"/>
 <available property="have-jdk-1.9" file="${nbjdk.home}/bin/jmod${.exe}"/>

Which assume checks against a jdk specific unique features to help determine 
which is available.

 

Does some of this different logic need to be added to the other jdk.xml files?

 

> NetBeans Platform Application only compiles with default JDK
> ------------------------------------------------------------
>
>                 Key: NETBEANS-3278
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-3278
>             Project: NetBeans
>          Issue Type: Bug
>          Components: apisupport - Harness
>    Affects Versions: 11.0, 11.1, 11.2
>         Environment: Windows 10
>            Reporter: matteodg
>            Priority: Major
>
> I created from scratch a simple NetBeans Platform Application with a single 
> module and I would like to use a Java Platform different than the default 
> one, but I can't because I got this error while building the application:
> {noformat}
> module.taskdefs:
> module.common-init:
> Warning: nbjdk.active=OpenJDK13 or nbjdk.home=D:\Java\OpenJDK\jdk-13.0.1 is 
> an invalid Java platform; ignoring and using D:\Java\OpenJDK
> module.projectized-common.basic-init:
> module.basic-init:
> {noformat}
> I'm launching NetBeans IDE with Oracle JDK 13 (default JDK) but I would like 
> to compile and run with OpenJDK 13 (which I properly configured in 
> Tools->Java Platforms).
> I checked and this bug is present in NB 11.0, 11.1 and 11.2-beta3 as well



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

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

Reply via email to