It looks like a lot of people are interested in using JavaFX into one of their Eclipse Views. I infer that from the people visiting my blog from a stackoverflow question.
The problem people face is that in Eclipse JavaFX has to run in an OSGi-Environment and JavaFX is not prepared for that leading to all sorts of problems when one applies the standard strategies (e.g. simply repackaging the javafx.jar as an OSGi-Bundle).
I’m happy to announce that the upcoming e(fx)clipse release 0.0.13 will fix your problems and make it very easy to use JavaFX inside your Eclipse Views.
The important changes that went into 0.0.13 is that different deployment models are going to be supported:
- System installation: This deployment model requires your users to have JavaFX pre-installed on their system
- Next to your app installation: This deployment model requires you to place javafx next to your RCP/IDEs launcher – similar to how you can deploy a JRE with your Eclipse Application
- As a bundle installation: Here you place your javafx.jar into an OSGi-Bundle and the e(fx)clipse runtime will take care of extracting and wireing
If you want to see it in action you can download a self-contained win32/32bit version of a RCP using this link which uses the 3rd deployment strategy.
The sources are checked into the e(fx)clipse git-repo.
Once 0.0.13 is released (which is going to be next weekend) I hope I can come up with a tutorial.
Pingback: Java desktop links of the week, March 12 | Jonathan Giles
Pingback: JavaFX links of the week, March 12 // JavaFX News, Demos and Insight // FX Experience
Hi Tom, I got an 403 for http://www.efxclipse.org/downloads/efxrcp.zip.
Maybe you could fix that!?
Regards,
Markus
403: Access forbidden! when trying to retrieve http://www.efxclipse.org/downloads/efxrcp.zip
ok fixed the privileges – thanks for reporting
I think I have to wait for the next generation of 16-cores GPUs in order to enjoy JavaFX
I’m not sure – maybe it is not using the directx or opengl pipeline and so falls back to software rendering? Did you try to execute a simple JavaFX demo and run it with debug output so that you find out which pipeline it uses?
I extracted the source for the example plug-in from your github (at.bestsolution.efxclipse.runtime.examples.rcp) and I got:
java.lang.IllegalStateException: Could not find a JavaFX 2.0.2 Installation
at at.bestsolution.efxclipse.runtime.osgi.fxloader.FXClassLoader$MyBundleClassLoader.createClassloader(FXClassLoader.java:273)
How do I correctly add the javafx.jar to the plugin?
Thanks
I think you are running in e(fx)clipse 0.0.12 and there the classloader is not prepared for this new deployment model stuff – you should wait until 0.0.13 (due this weekend) and then the application from the git-repo will start working. 0.0.13 will come with a wizard that allows you to repackage an installed javafx-rt as an OSGi-Bundle useable for the new deployment mode.
Pingback: e(fx)clipse 0.0.13 released | Tomsondev Blog
http://www.efxclipse.org/tut4.html
Dont work on Linux
java 7, javafx 2.2, e(fx) lastest
java.lang.IllegalStateException: Could not find a JavaFX installation. Run with -Defxclipse.osgi.hook.debug=true to get debug output. Check your osg/arch ‘linux/x86_64’ in case you want to use repackaging.
at at.bestsolution.efxclipse.runtime.osgi.fxloader.FXClassLoader$MyBundleClassLoader.createClassloader(FXClassLoader.java:698)
at at.bestsolution.efxclipse.runtime.osgi.fxloader.FXClassLoader$MyBundleClassLoader.(FXClassLoader.java:193)
at at.bestsolution.efxclipse.runtime.osgi.fxloader.FXClassLoader.createClassLoader(FXClassLoader.java:92)
Linux 7jdk does not ship with javafx! You need to download the fx-SDK and repackage it!
Thanks for answer. I have javafx sdk, and its works in simple eclipse projects.
What do you mean by “repackage sdk”?
Please join our google-forum where we provide support.
Tom
Hi Tom.
Nowadays, We have a project with JDK 1.7_17 and JavaFX 2.2.7 with different features and plugins. One plugin has javafx and one dependency with at.bestsolution.efxclipse.runtime.javafx and this works fine.
My problem is when i tried to compile my product with tycho and maven, because always got an error of compilation failure due to javafx.
These errors are for example that not found the import javafx.embed.swt.FXCanvas, import javafx.scene.Scene, so on. Can you help me? I want to know as i should configure my main pom.xmml to find the jar javafx.
I think I already answered this on the forum: https://groups.google.com/forum/#!topic/efxclipse/IGx-sAvikLE