Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » RCP e4 SWT/JavaFX application with Kepler
RCP e4 SWT/JavaFX application with Kepler [message #1116476] Wed, 25 September 2013 14:00 Go to next message
Mar Ifla is currently offline Mar IflaFriend
Messages: 22
Registered: September 2013
Junior Member
I managed to create an SWT/JavaFX application with Eclipse Juno and e(fx)clipse 0.8.1.

I wanted to do the same now with Kepler and e(fx)clipse 0.9.0 and I'm stuck.

When starting the application (via a product launch config) I get the error message about the missing bundle:
!MESSAGE Bundle at.bestsolution.efxclipse.runtime.osgi not found.

As the bundle apparently isn't part of e(fx)clipse 0.9.0, I downloaded it bundle and at.bestsolution.efxclipse.runtime.javafx from Github into my workspace.
I added theses plug-ins to the products run configuration and added -Dosgi.framework.extensions=at.bestsolution.efxclipse.runtime.osgi to the launch configs VM arguments.

Do I perhaps need to add these plug-ins to my target platform? How would I do that?
Re: RCP e4 SWT/JavaFX application with Kepler [message #1116506 is a reply to message #1116476] Wed, 25 September 2013 14:31 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5470
Registered: July 2009
Senior Member
This won't work because framework adapter hooks are ONLY loaded when
org.eclipse.osgi is in the very same filesystem path.

In 0.9.0 the complete namespace had to be shifted to org.eclipse.fx you
could fix everything by hand but I'd suggest to let the tooling
bootstrap you a new e4 Application and you copy over the relevant stuff
from the 0.8.1 project.

I'm sorry about that but this namespace shift was necessary when moving
to Eclipse.org - so it will never happen again.

Tom

On 25.09.13 16:01, Mar Ifla wrote:
> I managed to create an SWT/JavaFX application with Eclipse Juno and
> e(fx)clipse 0.8.1.
>
> I wanted to do the same now with Kepler and e(fx)clipse 0.9.0 and I'm
> stuck.
>
> When starting the application (via a product launch config) I get the
> error message about the missing bundle:!MESSAGE Bundle
> at.bestsolution.efxclipse.runtime.osgi not found.
> As the bundle apparently isn't part of e(fx)clipse 0.9.0, I downloaded
> it bundle and at.bestsolution.efxclipse.runtime.javafx from Github into
> my workspace.
> I added theses plug-ins to the products run configuration and added
> -Dosgi.framework.extensions=at.bestsolution.efxclipse.runtime.osgi to
> the launch configs VM arguments.
>
> Do I perhaps need to add these plug-ins to my target platform? How would
> I do that?
Re: RCP e4 SWT/JavaFX application with Kepler [message #1116533 is a reply to message #1116506] Wed, 25 September 2013 15:12 Go to previous messageGo to next message
Mar Ifla is currently offline Mar IflaFriend
Messages: 22
Registered: September 2013
Junior Member
Well, actually I started from scratch with a sample application. What I did:

  1. installed Eclipse Kepler
  2. installed e(fx)clipse 0.9.0 and e4 tools 0.14
  3. created new Eclipse 4 -> Eclipse 4 Application project (with sample content; product runs fine)
  4. created new target platform from ​http://download.eclipse.org/efxclipse/runtime-nightly/site and added Kepler plug-ins (don't know if I was supposed to do that)
  5. created an FX part injecting BorderPane (everything is fine at compile time)

On running the product I get an ClassNotFoundException at runtime when the parts @PostConstruct method is called.
!ENTRY org.eclipse.e4.ui.workbench 4 0 2013-09-25 17:07:43.644
!MESSAGE Unable to create class 'swt.fx.test.app.parts.FXPart' from bundle '5'
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/scene/Node

That's when I tried to include the at.bestsolution.* stuff.


[Updated on: Wed, 25 September 2013 15:14]

Report message to a moderator

Re: RCP e4 SWT/JavaFX application with Kepler [message #1116591 is a reply to message #1116533] Wed, 25 September 2013 16:28 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5470
Registered: July 2009
Senior Member
Ok so you are creating an e4 SWT application and want to embedd JavaFX?
I assumed from your other question on the e4 forum that you are using
pure JavaFX.

You need to add:
* org.eclipse.fx.javafx
* org.eclipse.fx.osgi
* org.eclipse.fx.ui.di.interopt

to your launch config and also set
-Dosgi.framework.extensions=org.eclipse.fx.osgi and then things should work.

Tom

On 25.09.13 17:12, Mar Ifla wrote:
> Well, actually I started from scratch with a sample application. What I
> did:
>
>
> installed Eclipse Kepler
> installed e(fx)clipse 0.9.0 and e4 tools 0.14
> created new Eclipse 4 -> Eclipse 4 Application project (with sample
> content; product runs fine)
> created new target platform from ​
> http://download.eclipse.org/efxclipse/runtime-nightly/site and added
> Kepler plug-ins (don't know if I was supposed to do that)
> in the application created FX part injecting BorderPane (everything is
> fine at compile time)
>
> On running the produnct I get an ClassNotFoundException at runtime when
> the parts @PostConstruct method is called.!ENTRY
> org.eclipse.e4.ui.workbench 4 0 2013-09-25 17:07:43.644
> !MESSAGE Unable to create class 'swt.fx.test.app.parts.FXPart' from
> bundle '5'
> !STACK 0
> org.eclipse.e4.core.di.InjectionException:
> java.lang.NoClassDefFoundError: javafx/scene/Node
> That's when I tried to include the at.bestsolution.* stuff.
Re: RCP e4 SWT/JavaFX application with Kepler [message #1116601 is a reply to message #1116591] Wed, 25 September 2013 16:43 Go to previous messageGo to next message
Mar Ifla is currently offline Mar IflaFriend
Messages: 22
Registered: September 2013
Junior Member
Thomas Schindl wrote on Wed, 25 September 2013 18:28
Ok so you are creating an e4 SWT application and want to embedd JavaFX?
I assumed from your other question on the e4 forum that you are using
pure JavaFX.

Well I'm still unsure if I want to use FX rendering for the whole application or just for some special parts. So I'm experimenting around a bit. Smile

Quote:
You need to add:
* org.eclipse.fx.javafx
* org.eclipse.fx.osgi
* org.eclipse.fx.ui.di.interopt

to your launch config and also set
-Dosgi.framework.extensions=org.eclipse.fx.osgi and then things should work.
That did the trick. Thanks a lot! Smile

Just one more thing... the way I created the target platform:

Mar Ifla wrote on Wed, 25 September 2013 17:12
created new target platform from ​http://download.eclipse.org/efxclipse/runtime-nightly/site and added Kepler plug-ins

... is that the correct way to do it?



[Updated on: Wed, 25 September 2013 16:44]

Report message to a moderator

Re: RCP e4 SWT/JavaFX application with Kepler [message #1133053 is a reply to message #1116601] Fri, 11 October 2013 15:22 Go to previous message
Mar Ifla is currently offline Mar IflaFriend
Messages: 22
Registered: September 2013
Junior Member
I'm still having some problems which I assume result from not having the correct target platform.

How do I create a correct one for an e4 SWT application with embedded JavaFX?

[Updated on: Fri, 11 October 2013 15:22]

Report message to a moderator

Previous Topic:Accessing the controller instance when using FXMLLoaderFactory
Next Topic:OSGi: loading an FXML file from another bundle
Goto Forum:
  


Current Time: Fri Nov 28 14:03:30 GMT 2014

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

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