Hi Eirik,

check the project.properties of the module in question.

if it has:
javac.source=1.8

replace it with:
javac.source=11
javac.target=11

after that you could put this into manifest.mf:
OpenIDE-Module-Java-Dependencies: Java > 11

modules which use nb-javac are a special case, i plan to put that into a meta issue since that is more complicated and we have to take special care in CI for that.

-mbien


On 02.12.23 19:41, Eirik Bakke wrote:
Hi, netbeans-dev.

Normally I build NetBeans from sources by just running the command "ant" from 
the root of the repo.

While making some improvements to the platform\openide.util.ui\ImageUtilities class, I concluded I 
need to use the java.awt.image.MultiResolutionImage class, which only became available in JDK 9. 
With a plain "ant" build I get a "cannot find symbol" error when referencing it.

What build option do I need to set to build NetBeans on a newer Java version, 
and get access to the Java 9 APIs from the openide.util.ui module?

My JAVA_HOME environment variable is already pointing at Java 11.

(The specific use case here is to make SVG/HiDPI/Retina icons work in the main 
menu bar on MacOS, for my NetBeans Platform application. This requires use of 
the MultiResolutionImage class.)

-- Eirik




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

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



Reply via email to