On 02.12.23 19:52, Michael Bien wrote:
Hi Eirik,

check the project.properties of the module in question.

if it has:
javac.source=1.8

btw the reason why javac says that it can't see the class is because the '-source' property is mapped to '-release' under certain conditions by the custom ant task which runs javac. And the release option links to the specified version of the JDK API (which is a good thing).

https://github.com/apache/netbeans/blob/b9cadbc946b1d42553efd528fee856178798c681/platform/openide.util.ui/nbproject/project.properties

at some point we will only have

javac.release=xx

but for now its better to use the source+target combo as mentioned before

-mbien



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