Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Access JavaFX from a eclipse plug-in code in Java 8
Access JavaFX from a eclipse plug-in code in Java 8 [message #1794970] Tue, 11 September 2018 21:16 Go to next message
chaitanya tangudu is currently offline chaitanya tanguduFriend
Messages: 11
Registered: July 2009
Junior Member
I am trying to use JavaFX package in a Java 8 code from eclipse plug-in. I was able to compile it, but at run-time the plug-in is not able get JavaFX class loaded. Looks like, OSGi Plug-in is not able load classes from "[JAVA]\jre\lib\ext\" directory, but able to load classes from "[JAVA]\jre\lib\".
I couldn't import javafx packages from imported packages as well. I think, I am missing something in OSGi class loading.
Any pointers how to resolve the issue is highly appreciated.


** I understand there is a way by including e(fx)clipse or copying jfxrt.jar to the plug-in class-path will resolve the issue, but I wanted to know why plug-in is not able to load from /ext/ path of the JRE.
Re: Access JavaFX from a eclipse plug-in code in Java 8 [message #1795051 is a reply to message #1794970] Thu, 13 September 2018 15:10 Go to previous message
chaitanya tangudu is currently offline chaitanya tanguduFriend
Messages: 11
Registered: July 2009
Junior Member
Following is the way, we fixed the issue.
Just to add more details regarding the solution,
The following are the OSGi configuration properties.
org.osgi.framework.bundle.parent - Specifies which class loader is used for boot delegation. Possible values are: boot for the boot class loader, app for the application class loader, ext for the extension class loader, and framework for the framework's class loader. The default is boot.
org.osgi.framework.system.packages - Specifies a comma-delimited list of packages that should be exported via the System Bundle from the framework class loader. The framework will set this to a reasonable default. If the value is specified, it replaces any default value.
So by adding -Dorg.osgi.framework.bundle.parent=ext -Dorg.osgi.framework.system.packages.extra=javafx.* the VM args, it added required dependency.
Previous Topic:Exporting Feature Fails - Photon 4.8.0
Next Topic:Debugging plugin does not work with photan
Goto Forum:
  


Current Time: Fri Apr 19 21:01:07 GMT 2024

Powered by FUDForum. Page generated in 0.03149 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top