Skip to content

Dependency on org-netbeans-libs-javafx does not activate it automatically and does not provide basic JFX modules #9334

@stefanofornari

Description

@stefanofornari

Apache NetBeans version

Apache NetBeans 29

What happened

I am developing a NB module and I'd like to use javafx. I'd like also not to include all JFX dependencies into the module nbm.

I understand this should be done by declaring a dependency on org-netbeans-libs-javafx, but I could not make it work, despite all the tricks I have tried. Here what I have tried and the results:

  1. Include org-netbeans-libs-javafx as a module dependency, either in the nbm plugin or directly in the manifest; the module is not automatically activated when I install my module with the result that JPanelFX is not available (ClassNotFound exception).
  2. Activating org-netbeans-libs-javafx manually made a step forward: JPanelFX becomes available, but no FXML or Control libraries are available unless you defined the dependencies as regular dependencies (which brings the libraries into the nbm)
  3. Created and registered an Installer class, as I read a suggestion to do it in the hope this would have triggered org-netbeans-libs-javafx activation.

Although there is the workaround to include JavaFX as dependencies, it would be highly appreciated NB has a simple and automatic way to include it as a ecosystem module available in the platform.

PS: I can provide a simple module if needed

Language / Project Type / NetBeans Component

Java Maven Project

How to reproduce

  1. Create a simple module that opens a simple javafx app
  2. Add org-netbeans-libs-javafx as module dependency (OpenIDE-Module-Requires: org.netbeans.libs.javafx)
  3. Build and install the module
  4. Run the app

Expected Behaviour
The app just works

Current Bahaviour
The app does not work (class not found exceptions are logged into the IDE log)

Did this work correctly in an earlier version?

No / Don't know

Operating System

linux

JDK

25

Apache NetBeans packaging

Apache NetBeans binary zip

Anything else

No response

Are you willing to submit a pull request?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    JavaFX[ci] enable JavaFX jobPlatform[ci] enable platform tests (platform/*)kind:bugBug report or fixneeds:triageRequires attention from one of the committers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions