Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » How to embed JavaFX into an Eclipse rcp plugin ?
How to embed JavaFX into an Eclipse rcp plugin ? [message #1787312] Wed, 23 May 2018 14:46 Go to next message
adrian m is currently offline adrian mFriend
Messages: 1
Registered: May 2018
Junior Member
Hello ,

My goal is to have a swt ViewPart that includes a FXCanvas ,
but for the moment I have just a SWT button that attempts to launch a JavaFX application .

Inside the Eclipse IDE everything compiles and seems ok, but at runtime I get NoClassDefFound errors for all the javafx classes.

Obviously I've already tried to search for solutions online, but many of the articles are referring to different issues , or older versions when the javafx wasn't part of the jdk/jre.

What i've been able to understand is that my plugin doesn't have access to the javafx classes (even if the jdk contains the jfxrt.jar and the jfxswt.jar) because that's how the classloader works : it doesn't add those classes to the plugin's classpath .
On one hand, i've found some references about adding some imports in the manifest , but on the other hand apparently that is obsoleted and I should use some '-Dorg.osgi.framework.bundle.parent=ext' parameter but that doesn't seem to work .

I'm not sure if the efxclipse can help me . I have installed it from the marketplace, but it seems that it's only providing some additional project types and other tools for development .

Does anyone have any suggestion about how to approach the problem ?

Thanks for any tip/advice,
Adrian



Re: How to embed JavaFX into an Eclipse rcp plugin ? [message #1787563 is a reply to message #1787312] Tue, 29 May 2018 07:23 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
First of all without I highly doubt your project would compile without having e(fx)clipse installed because you'd not find FXCanvas on the classpath. The '-Dorg.osgi.framework.bundle.parent=ext' only helps for JavaFX-Classes for FXCanvas to work at runtime you need the AdapterHook we provide. Take a look at https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial2
Previous Topic:ContextMenu not showing
Next Topic:how to add new part in the javafx e4 editor
Goto Forum:
  


Current Time: Tue Mar 19 06:35:47 GMT 2024

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

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

Back to the top