Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » JavaFX 8u20 support in e(fx)clipse
JavaFX 8u20 support in e(fx)clipse [message #1441920] Fri, 10 October 2014 11:16 Go to next message
Mandar Machekar is currently offline Mandar MachekarFriend
Messages: 16
Registered: October 2014
Junior Member
Hi,

Currently efxclipse has dependency on javafx 2.2. I want to use 'ControlsFX' javafx library but it requires JavaFX- 8u20 version. Is it possible to use javafx 8.x with efxclipse application?

Secondly I am using jdk 8.20 and javafx rutime 'jfxrt.jar' is in the jre path, but if I remove javafx plugin dependency (org.eclipse.fx.javafx_2.2.0.x.jar) then why application don't find javafx classes?

-Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1441981 is a reply to message #1441920] Fri, 10 October 2014 12:51 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi Mandar

I use efxclipse 1.0 with JDK 8u20, ControlsFX 8.20.7 and openjfx-dialogs 1.0.2, so yes, it is possible.
The version number of the plugin org.eclipse.fx.javafx 2.2.0 does not restrict the jdk you use.
You need this dependency in OSGi/Equinox applications so that the bundle classloader can find the JavaFX classes.

Have you tried it? What happend?

Greetings
Christoph
Re: JavaFX 8u20 support in e(fx)clipse [message #1442510 is a reply to message #1441981] Sat, 11 October 2014 07:11 Go to previous messageGo to next message
Mandar Machekar is currently offline Mandar MachekarFriend
Messages: 16
Registered: October 2014
Junior Member
Hi Christoph

I am using Dialogs from ControlFx.
Code :
Action response = Dialogs.create().owner(scene.getWindow())
.title("Confirm Save")
.message("Do you want to save the changes?").showConfirm();
When above dialog is shown following error is thrown.

Caused by: java.lang.ClassNotFoundException: com.sun.javafx.scene.traversal.Algorithm cannot be found by org.controlsfx_8.20.7
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
----
Now com.sun.javafx.scene.traversal.Algorithm class is not available in plugin org.eclipse.fx.javafx 2.2.0 but is in JDK 8u20

Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1442593 is a reply to message #1442510] Sat, 11 October 2014 10:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
org.eclipse.fx.javafx does export "com.sun.javafx.scene.traversal" - the
org.eclipse.fx.javafx-bundle is only a fake bundle. Make sure the JRE
you are launching is really the u20.

Tom

On 11.10.14 09:11, Mandar Machekar wrote:
> Hi Christoph
>
> I am using Dialogs from ControlFx.
> Code :
> Action response = Dialogs.create().owner(scene.getWindow())
> .title("Confirm Save")
> .message("Do you want to save the
> changes?").showConfirm();
> When above dialog is shown following error is thrown.
>
> Caused by: java.lang.ClassNotFoundException:
> com.sun.javafx.scene.traversal.Algorithm cannot be found by
> org.controlsfx_8.20.7
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ----
> Now com.sun.javafx.scene.traversal.Algorithm class is not available in
> plugin org.eclipse.fx.javafx 2.2.0 but is in JDK 8u20
>
> Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1443734 is a reply to message #1442593] Mon, 13 October 2014 06:31 Go to previous messageGo to next message
Mandar Machekar is currently offline Mandar MachekarFriend
Messages: 16
Registered: October 2014
Junior Member
hmm.. it is strange, the same code works in plain JavaFx Application.
I am running both the apps from development environment . The java path shown in console is same - '/Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home/bin/java'.

Mandar

Re: JavaFX 8u20 support in e(fx)clipse [message #1443737 is a reply to message #1443734] Mon, 13 October 2014 06:36 Go to previous messageGo to next message
Mandar Machekar is currently offline Mandar MachekarFriend
Messages: 16
Registered: October 2014
Junior Member
Hi Tom,

I am new to eclipse rcp. To integrate controlFx lib, I have created a plugin 'org.controlsfx' from controlFx jar file. Is this a right way to integrate third party libs ?

Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1443772 is a reply to message #1443737] Mon, 13 October 2014 07:35 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Did you add "org.eclipse.fx.javafx"
as a dependency to "org.controlsfx" in its MANIFEST.MF?

This is what our MANIFEST.MF for ControlsFX looks like:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Controls FX
Bundle-SymbolicName: de.emsw.gosa.lib.controlsfx;singleton:=true
Bundle-Version: 8.0.7
Bundle-ClassPath: .,
 controlsfx-8.20.7.jar,
 openjfx-dialogs-1.0.2.jar
Export-Package: javafx.scene.control,
 org.controlsfx,
 org.controlsfx.control,
 org.controlsfx.control.action,
 org.controlsfx.control.cell,
 org.controlsfx.control.decoration,
 org.controlsfx.control.spreadsheet,
 org.controlsfx.control.table,
 org.controlsfx.control.table.model,
 org.controlsfx.control.textfield,
 org.controlsfx.dialog,
 org.controlsfx.glyphfont,
 org.controlsfx.property,
 org.controlsfx.property.editor,
 org.controlsfx.tools,
 org.controlsfx.validation,
 org.controlsfx.validation.decoration
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Require-Bundle: org.eclipse.fx.javafx;bundle-version="2.2.0";visibility:=reexport
Bundle-ActivationPolicy: lazy

Re: JavaFX 8u20 support in e(fx)clipse [message #1443782 is a reply to message #1443772] Mon, 13 October 2014 07:46 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I suggest to use package imports instead of require-bundle but it is
important that you all packages referenced are imported else OSGi does
not know from where it should load the references.

I'm more and more leaning towards NOT using "org.eclipse.fx.javafx" and
the OSGi Hooks in a e4+JavaFX application but starting Equinox with
-Dorg.osgi.framework.bundle.parent=ext.

This makes:
a) all package imports needless
b) other stuff like Nashorn work appropriately

The only thing left which requires "org.eclipse.fx.javafx" is when you
try to integrate into the Eclipse IDE or any other Equinox-Application
which requires to launch with the obscure default classloading strategy.

Thoughts?

Tom

On 13.10.14 09:36, Christoph Keimel wrote:
> Did you add "org.eclipse.fx.javafx"
> as a dependency to "org.controlsfx" in its MANIFEST.MF?
>
> This is what our MANIFEST.MF for ControlsFX looks like:
> Manifest-Version: 1.0
> Bundle-ManifestVersion: 2
> Bundle-Name: Controls FX
> Bundle-SymbolicName: de.emsw.gosa.lib.controlsfx;singleton:=true
> Bundle-Version: 8.0.7
> Bundle-ClassPath: .,
> controlsfx-8.20.7.jar,
> openjfx-dialogs-1.0.2.jar
> Export-Package: javafx.scene.control,
> org.controlsfx,
> org.controlsfx.control,
> org.controlsfx.control.action,
> org.controlsfx.control.cell,
> org.controlsfx.control.decoration,
> org.controlsfx.control.spreadsheet,
> org.controlsfx.control.table,
> org.controlsfx.control.table.model,
> org.controlsfx.control.textfield,
> org.controlsfx.dialog,
> org.controlsfx.glyphfont,
> org.controlsfx.property,
> org.controlsfx.property.editor,
> org.controlsfx.tools,
> org.controlsfx.validation,
> org.controlsfx.validation.decoration
> Bundle-RequiredExecutionEnvironment: JavaSE-1.8
> Require-Bundle:
> org.eclipse.fx.javafx;bundle-version="2.2.0";visibility:=reexport
> Bundle-ActivationPolicy: lazy
>
Re: JavaFX 8u20 support in e(fx)clipse [message #1443822 is a reply to message #1443772] Mon, 13 October 2014 08:48 Go to previous messageGo to next message
Mandar Machekar is currently offline Mandar MachekarFriend
Messages: 16
Registered: October 2014
Junior Member
Thanks Christoph,
Its working! You are right, "org.eclipse.fx.javafx" plugin dependency was missing in MANIFEST.MF.
I was importing all javafx classes in MANIFEST.MF like below which do not work.
...
..
Import-Package: javafx.animation;version="2.2.0",
 javafx.application;version="2.2.0",
 javafx.beans;version="2.2.0",
 javafx.beans.binding;version="2.2.0",
....


Cheers!
Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1443828 is a reply to message #1443822] Mon, 13 October 2014 08:56 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The class you wanted to load was coming from com.sun.... - if you'd had
imported those as well import-package would have worked as well!

Tom

On 13.10.14 10:48, Mandar Machekar wrote:
> Thanks Christoph,
> Its working! You are right, "org.eclipse.fx.javafx" plugin dependency
> was missing in MANIFEST.MF.
> I was importing all javafx classes in MANIFEST.MF like below which do
> not work.
>
> ..
> .
> Import-Package: javafx.animation;version="2.2.0",
> javafx.application;version="2.2.0",
> javafx.beans;version="2.2.0",
> javafx.beans.binding;version="2.2.0",
> ...
>
>
> Cheers!
> Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1443862 is a reply to message #1443828] Mon, 13 October 2014 09:55 Go to previous messageGo to next message
Mandar Machekar is currently offline Mandar MachekarFriend
Messages: 16
Registered: October 2014
Junior Member
yes, ur right Tom, after importing com.sun.... packages it is working too without "org.eclipse.fx.javafx" plugin dependency.
I was not clear about need of importing 'com.sun..' packages, I just picked up entries from the manifest of my application, which is generated by wizard!

Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1443872 is a reply to message #1443862] Mon, 13 October 2014 10:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
The wizard only adds "API" packages. com.sun.... is an internal NONE-API
package which has to be used with caution, it can vanish ANY time, I'm
using it myself because sometimes you have no other choice but it is NOT
good practice, so the wizards will never add it by default!

Tom

On 13.10.14 11:55, Mandar Machekar wrote:
> yes, ur right Tom, after importing com.sun.... packages it is working
> too without "org.eclipse.fx.javafx" plugin dependency.
> I was not clear about need of importing 'com.sun..' packages, I just
> picked up entries from the manifest of my application, which is
> generated by wizard!
>
> Mandar
Re: JavaFX 8u20 support in e(fx)clipse [message #1443914 is a reply to message #1443782] Mon, 13 October 2014 11:51 Go to previous message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Thomas Schindl wrote on Mon, 13 October 2014 09:46
I suggest to use package imports instead of require-bundle but it is
important that you all packages referenced are imported else OSGi does
not know from where it should load the references.

I'm more and more leaning towards NOT using "org.eclipse.fx.javafx" and
the OSGi Hooks in a e4+JavaFX application but starting Equinox with
-Dorg.osgi.framework.bundle.parent=ext.

This makes:
a) all package imports needless
b) other stuff like Nashorn work appropriately

The only thing left which requires "org.eclipse.fx.javafx" is when you
try to integrate into the Eclipse IDE or any other Equinox-Application
which requires to launch with the obscure default classloading strategy.

Thoughts?

Tom


Love to discuss the pros and cons over a tasty beverage sometime Smile
Previous Topic:Unable to launch tycho generated application
Next Topic:Fixed versions update site?
Goto Forum:
  


Current Time: Sat Apr 27 01:07:07 GMT 2024

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

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

Back to the top