You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by stephen cumminger <st...@sonideft.com> on 2025/10/22 13:27:41 UTC

Using Java Incubator features in NetBeans RCP Application

Has anyone gotten Incubator features working in a NetBeans RCP app? I am using NB20 and getting compile errors that can't be resolved. Specifically I am trying to use jdk.incubator.vector to access faster SIMD instructions.

In the module where I am trying to use this, I have the following in its project.properties file:
javac.compilerargs=-Xlint -Xlint:-serial --enable-preview --add-modules jdk.incubator.vector

I also have in the project.properties file for the master project as

run.args.extra ... -J--enable-preview -J--add-modules=jdk.incubator.vector

I've gotten several suggestions via Google, but I think I am looking for a way to get NetBeans to fully compile and allow to run with these incubator features.

Any suggestions?

RE: Using Java Incubator features in NetBeans RCP Application

Posted by stephen cumminger <st...@sonideft.com>.
NetBeans default JDK for me is JDK20 and this incubator module has been available since about JDK17, so it should be in there.

My problem is strictly compiling right now and this is my modulue's project.properties file:

javac.source=20
javac.compilerargs=-Xlint -Xlint:-serial --release 20 --enable-preview --add-modules jdk.incubator.vector

Interesting though that this message appears in several places in the compiler warning messages:

warning: using incubating module(s): jdk.incubator.vector

In the offending class file, this import statement

import jdk.incubator.vector;

has tooltip messages that package jdk.incubator does not exist. A search for module dependency does not provide any suggestions.

A typical line of code that does not compile or have import suggestions is:

VectorSpecies<Float> species = FloatVector.SPECIES_256;

I also added "--enable-preview --add-modules jdk.incubator.vector" to the default_options assignment in my app.conf file.

I'm sure there must be some little thing I'm missing.



-----Original Message-----
From: Jerome Lelasseux <le...@yahoo.com> 
Sent: Wednesday, October 22, 2025 11:02 AM
To: stephen cumminger <st...@sonideft.com>
Subject: Re: Using Java Incubator features in NetBeans RCP Application

My JJazzLab rcp app (maven) uses the JDK17 "Foreign" incubator feature in one module. I just checked, I use the same flags than you and it works fine.

Are you sure to use the right JDK version ? You can't use a java 17 incubator feature using JDK18 (even with --release 17).

Jerome



Le mercredi 22 octobre 2025 à 15:27:59 UTC+2, stephen cumminger <st...@sonideft.com> a écrit : 





Has anyone gotten Incubator features working in a NetBeans RCP app? I am using NB20 and getting compile errors that can’t be resolved. Specifically I am trying to use jdk.incubator.vector to access faster SIMD instructions. 



In the module where I am trying to use this, I have the following in its project.properties file:

javac.compilerargs=-Xlint -Xlint:-serial --enable-preview --add-modules jdk.incubator.vector



I also have in the project.properties file for the master project as



run.args.extra … -J--enable-preview -J--add-modules=jdk.incubator.vector



I’ve gotten several suggestions via Google, but I think I am looking for a way to get NetBeans to fully compile and allow to run with these incubator features.



Any suggestions?