This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | Reguest for JavaFX API | ||
---|---|---|---|
Product: | platform | Reporter: | maxnitribitt <maxnitribitt> |
Component: | Embedded Browser | Assignee: | Stanislav Aubrecht <saubrecht> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gailanderson, jtulach, pjiricka, psomol |
Priority: | P3 | ||
Version: | 7.3 | ||
Hardware: | PC | ||
OS: | Mac OS X | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
maxnitribitt
2012-10-13 02:08:18 UTC
> The most convenient option from a developer perspective would be a module that
> exposes the classes from the bundled jfxrt.jar and doesn't require to use reflection.
I am not sure if this is doable - the NetBeans module system can expose APIs of jar files that are inside the NetBeans directory structure, but not for jar files which are dynamically located at the classloader level such as jfxrt.jar. We can not rely on jfxrt.jar being "bundled". Cc'ing Jarda as the module system guru.
Can you explain the reasons for the current architecture in 7.3 dev builds, so it's easier for us to understand what your requirements are? Up to now, when using JavaFX in NB Platform, I create a library wrapper for the jfxrt.jar. That allows me to simply code in a NB Module with all the editor features. (there are additional problems with this approach, but it's a workable solution) What is the reason this can't/shouldn't be done in NB as a prerequisite? Why do you need to load it dynamically at runtime? Is it in order to allow the user to define which JavaFX Runtime should be used, or switch runtimes, etc.? If so, would it be possible to decide on startup wether the module classloader should actually load the jar or not. Then the module would be there (all dependencies of dependent modules satisfied), and the jfxrt.jar would be loaded by the application loader anyway. I'm asking because the main point of an API to me is to simplify seamless development with NB Platform and JavaFX. I wouldn't want to use reflection like in core.browser.webview to add a JFXPanel to my TopComponent. That wouldn't feel like a step forward. > Up to now, when using JavaFX in NB Platform, I create a library wrapper > for the jfxrt.jar. But that's not sufficient, right? The entire JavaFX runtime still needs to be installed on the disk, as it contains all the system-specific native libraries that are needed to run the application. Don't you still need some mechanism to locate the JavaFX runtime? > If so, would it be possible to decide on startup wether the module classloader > should actually load the jar or not. I defer this question to someone who is more knowledgeable about the NB module system. > I wouldn't want to use reflection like > in core.browser.webview to add a JFXPanel to my TopComponent. I understand and agree that this does not make sense for your usecase. Fo the WebView usecase, the use of reflection is very limited and isolated, so we don't see that as a big problem, especially since it can save a lot on the download size. There's libs.javafx module which is a wrapper for JavaFX libraries. |