netbeans
netbeans copied to clipboard
Adding JavaFX sources to Ant Library
Apache NetBeans version
Apache NetBeans 23
What happened
Problem: After creating a Library for JavaFX as shown in JavaFX and NetBeans: Non-modular projects: IDE and adding src.zip to the "Sources" pane of the Ant Library Manager, navigating to a source file produces a disassembled listing, as from javap -c, and the source is not available for debugging. A Maven project with downloaded sources works as expected
Mitigation: Because the Add URL… button is disabled, editing the corresponding library XML manually to use a jar URL for each module, as shown here, restores the expected navigation and debugging functionality.
<resource>jar:file:/…/lib/javafx-sdk-21.0.4/src.zip!/javafx.base/</resource>
<resource>jar:file:/…/lib/javafx-sdk-21.0.4/src.zip!/javafx.controls/</resource>
…
Language / Project Type / NetBeans Component
Java with Ant Library, Java Application
How to reproduce
- Download a JavaFX SDK from here; the problem may reproduced with any of several iterations of versions 21 or 17.
- Create a project and shown in JavaFX and NetBeans: Non-modular projects: IDE.
- Add the
src.zipfile to the "Sources" pane of the Ant Library Manager for the Library created in the previous step. - Open any JavaFX program and attempt to navigate to any source class.
Did this work correctly in an earlier version?
No / Don't know
Operating System
MacOS Intel
JDK
java version "21.0.4" 2024-07-16 LTS
Apache NetBeans packaging
Apache NetBeans provided installer
Anything else
As Maven works correctly, Ant source access is a low priority issue that is easily mitigated.
Are you willing to submit a pull request?
No
Issue confirmed with javafx-sdk-21.0.5. Please consider adding JavaFX label.
@trashgod could you please check whether #7932 fixes the issue for you? A nightly build is available from the Checkspage or directly. Thank you.
@matthiasblaesing: Thank you for looking at this issue. Yes, #7932 works as expected, both
- Via import from the previous version on initial startup, and
- Via the Add URL… button of the "Sources" pane.
@trashgod thanks for testing!
Lets reopen until the fix is merged to master.