Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Use AquaFX or AeroFX Themes in e4/Equinox Application
Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1441987] Fri, 10 October 2014 13:01 Go to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Hi

I would like to try if it is possible to use the AeroFX or AquaFX themes in equinox/e4 applications. If I just download the jars and wrap them in bundles I get exceptions like this:

[2014-10-10 14:39:57,089] ERROR controls Failed to load skin 'com.aquafx_project.controls.skin.AquaButtonSkin' for control Button@1d189dc[styleClass=button]'Abbrechen'
java.lang.NullPointerException
at javafx.scene.control.Control.loadClass(Control.java:131)
at javafx.scene.control.Control.loadSkinClass(Control.java:712)
at javafx.scene.control.Control$4.invalidated(Control.java:672)
...

I excpected something like this because of the bundle classloaders. My question is: How do I work around this?

My second try was to place the jar in a fragment hosted by org.eclipse.fx.javafx. This does not work, because I can't see the classes in my main bundle, even if I export them from the fragment.

So I am wondering if it would make sense to add buddy classloading to org.eclipse.fx.javafx.

Before I experiment further I was hoping on some thoughts on the subject, so any input is highly appriciated.

Thanks!
Christoph
Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1442600 is a reply to message #1441987] Sat, 11 October 2014 10:35 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

I don't think that buddy classloading can help you (nor you could do
that because o.e.f.javafx is a fragment) and it simply delegates the
classloading to the extension classloader on Java8.

The problem you see is that the CSS is used to apply Skins and whole
CSS-Subsystem is loaded by the extension-classloader, so the only
solution i guess is that you put it in your ext dir.

I wonder how they plan to target this stuff in a modular Java9 but I
don't have a better idea.

Tom

On 10.10.14 15:01, Christoph Keimel wrote:
> Hi
>
> I would like to try if it is possible to use the http://www.aerofx.org/
> or http://aquafx-project.com/index.html themes in equinox/e4
> applications. If I just download the jars and wrap them in bundles I get
> exceptions like this:
>
> [2014-10-10 14:39:57,089] ERROR controls Failed to load skin
> 'com.aquafx_project.controls.skin.AquaButtonSkin' for control
> Button@1d189dc[styleClass=button]'Abbrechen' java.lang.NullPointerException
> at javafx.scene.control.Control.loadClass(Control.java:131)
> at javafx.scene.control.Control.loadSkinClass(Control.java:712)
> at javafx.scene.control.Control$4.invalidated(Control.java:672)
> ...
>
> I excpected something like this because of the bundle classloaders. My
> question is: How do I work around this?
>
> My second try was to place the jar in a fragment hosted by
> org.eclipse.fx.javafx. This does not work, because I can't see the
> classes in my main bundle, even if I export them from the fragment.
>
> So I am wondering if it would make sense to add buddy classloading to
> org.eclipse.fx.javafx.
> Before I experiment further I was hoping on some thoughts on the
> subject, so any input is highly appriciated.
>
> Thanks!
> Christoph
>
Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1481861 is a reply to message #1442600] Fri, 21 November 2014 09:28 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
I wanted to follow up on this to see if it works, but I am having problems including the library in the runtime.

1) I put aerofx-0.2,jar in the lib/ext of the jdk and I can see it in the JRE System Library Tree

2) To enable the styling it is required to call AeroFX.style();. I'm doing this on @PostContextCreate. Compliation works basically ... I see an access restriction warning on this line ...

3) I made sure to start my e4 application with the same jdk

I still get this exception:
java.lang.RuntimeException: Exception in Application start method
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
	at com.sun.javafx.application.LauncherImpl$$Lambda$1/17627104.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: org/aerofx/AeroFX
	at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:54)
	at org.eclipse.fx.ui.workbench.base.AbstractE4Application.invokePostContextCreate(AbstractE4Application.java:308)

Do I need to do something else to hook the library to equinox?
Or is the access restriction the problem here?

Smile,
Christoph

Thomas Schindl wrote on Sat, 11 October 2014 12:35
Hi,
The problem you see is that the CSS is used to apply Skins and whole
CSS-Subsystem is loaded by the extension-classloader, so the only
solution i guess is that you put it in your ext dir.

Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1481909 is a reply to message #1481861] Fri, 21 November 2014 10:18 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Equinox-Classloader does NOT see ExtClassPath-Entries by default.

Try launching equinox with "-Dorg.osgi.framework.bundle.parent=ext" this
configures equinox in a way anyone on this planet expects a classloader
hierarchies should look like.

Tom

On 21.11.14 10:28, Christoph Keimel wrote:
> I wanted to follow up on this to see if it works, but I am having
> problems including the library in the runtime.
>
> 1) I put aerofx-0.2,jar in the lib/ext of the jdk and I can see it in
> the JRE System Library Tree
>
> 2) To enable the styling it is required to call AeroFX.style();. I'm
> doing this on @PostContextCreate. Compliation works basically ... I see
> an access restriction warning on this line ...
>
> 3) I made sure to start my e4 application with the same jdk
>
> I still get this exception:java.lang.RuntimeException: Exception in
> Application start method
> at
> com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:875)
>
> at
> com.sun.javafx.application.LauncherImpl.lambda$launchApplication$147(LauncherImpl.java:157)
>
> at
> com.sun.javafx.application.LauncherImpl$$Lambda$1/17627104.run(Unknown
> Source)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.RuntimeException:
> org.eclipse.e4.core.di.InjectionException:
> java.lang.NoClassDefFoundError: org/aerofx/AeroFX
> at
> org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:54)
>
> at
> org.eclipse.fx.ui.workbench.base.AbstractE4Application.invokePostContextCreate(AbstractE4Application.java:308)
>
>
> Do I need to do something else to hook the library to equinox? Or is the
> access restriction the problem here?
>
> Smile,
> Christoph
>
> Thomas Schindl wrote on Sat, 11 October 2014 12:35
>> Hi,
>> The problem you see is that the CSS is used to apply Skins and whole
>> CSS-Subsystem is loaded by the extension-classloader, so the only
>> solution i guess is that you put it in your ext dir.
>
>
Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1481924 is a reply to message #1481909] Fri, 21 November 2014 10:32 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Yeah, that does it. Thanks! Interesting property ...
Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1690162 is a reply to message #1441987] Wed, 25 March 2015 14:06 Go to previous messageGo to next message
Andy Armaignac is currently offline Andy ArmaignacFriend
Messages: 6
Registered: February 2015
Junior Member
I have the same problem describe above but I want to use the metro style create by Pedro in a pure e4-fx app and y get this error when I run mi demo. Any ideas....???

GRAVE: Failed to load skin 'jfxtras.styles.jmetro8.MetroTextFieldSkin' for control PasswordField@2e235e7e[styleClass=text-input text-field password-field]
java.lang.NullPointerException
at javafx.scene.control.Control.loadClass(Unknown Source)
at javafx.scene.control.Control.loadSkinClass(Unknown Source)
at javafx.scene.control.Control$4.invalidated(Unknown Source)
at javafx.beans.property.StringPropertyBase.markInvalid(Unknown Source)
at javafx.beans.property.StringPropertyBase.set(Unknown Source)
at javafx.css.StyleableStringProperty.set(Unknown Source)
Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1690237 is a reply to message #1690162] Wed, 25 March 2015 23:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
So did you put the jar in the extension classpath?
Re: Use AquaFX or AeroFX Themes in e4/Equinox Application [message #1690807 is a reply to message #1690237] Tue, 31 March 2015 12:24 Go to previous message
Andy Armaignac is currently offline Andy ArmaignacFriend
Messages: 6
Registered: February 2015
Junior Member
Thanks Tom for the reply and I realized that I was putting the library in a wrong path (JRE/lib/ext) so when I moved it to %JAVA_HOME%/jre/lib/ext it worked... Thanks!!!
Previous Topic:com.ibm.icu is not shipped as part of the target in 2.0.0
Next Topic:EMF Edit and the FX Application Thread
Goto Forum:
  


Current Time: Fri Jan 24 11:04:45 GMT 2025

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

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

Back to the top