Ok, thanks.
At least with Karaf, there is no such "ClassNotFoundException" (JavaFX
packages must declared in the jre.properties file). I don't use things
explained in Paul's article.
I just need the initialize() of the class below to be called within a singleton
bundle. That bundle should be started before any other which uses JavaFX. Then
there is no more "primary window" and any bundle can show whatever things it
needs.
public final class FXInitializer extends Application {
private static BlockingQueue<FXInitializer> sync;
/**
* Initializes the FX windowing system.
*
* @throws InterruptedException
* If initialization was cancelled due to program exit
*/
public static FXInitializer initialize() throws InterruptedException {
return initialize(new String[0]);
}
/**
* Initializes the FX windowing system.
*
* @param a
* Arguments as gave to the "main" application
* @throws InterruptedException
* If initialization was cancelled due to program exit
*/
public static FXInitializer initialize(final String... a) throws
InterruptedException {
try {
Platform.setImplicitExit(false);
sync = new SynchronousQueue<>();
new Thread(() -> FXInitializer.launch(FXInitializer.class,
a)).start();
return sync.take();
} finally {
sync = null;
}
}
@Override
public void start(final Stage stage) throws InterruptedException {
stage.hide();
sync.put(this);
}
}
JP
-----Message d'origine-----
De : [email protected] [mailto:[email protected]]
Envoyé : jeudi 20 juillet 2017 13:50
À : [email protected]
Objet : Antwort: RE: Felix and JavaFX
I think you are refering to this one
http://paulonjava.blogspot.de/2014/11/making-javafx-better-with-osgi.html
regards
Marc
Von: CLEMENT Jean-Philippe <[email protected]>
An: "[email protected]" <[email protected]>,
Datum: 20.07.2017 10:26
Betreff: RE: Felix and JavaFX
Sorry, I didn't find Paul's article. From my point of view there is no issue
with JavaFX 8 (also succeeded with Java 9). Just the tiny workaround in order
to start the JavaFX engine - which is a bundle containing a single class class
with few lines of code.
Could you please remind me the link to Paul's article?
Regards,
JP
-----Message d'origine-----
De : Chuck Davis [mailto:[email protected]] Envoyé : jeudi 20 juillet 2017
05:32 À : [email protected] Objet : Re: Felix and JavaFX
All the ones Paul's article delineates.
On Tue, Jul 18, 2017 at 8:12 AM, CLEMENT Jean-Philippe <
[email protected]> wrote:
> Paul?
>
> I just replied to your initial question "I spent most of the day
> yesterday googling to find out if there is a way to build a JavaFX
> desktop application based upon Felix..."
>
> Well, which problem are you experiencing with JavaFX?
>
> JP
>
> -----Message d'origine-----
> De : Chuck Davis [mailto:[email protected]] Envoyé : lundi 17 juillet
> 2017 18:41 À : [email protected] Objet : Re: Felix and JavaFX
>
> JP, are you doing the same thing Paul outlines in his article? If
> you've taken a different approach can you share it for the benefit of
> all of us following this thread?
>
> Thanks.
>
> On Mon, Jul 17, 2017 at 12:55 AM, CLEMENT Jean-Philippe <
> [email protected]> wrote:
>
> > Hi,
> >
> > We are making OSGi desktop applications with JavaFX without any issue.
> > We do not rely on Eclipse or Equinox. We are using Karaf and
> > maven-bundle-plugin.
> >
> > There is only a small workaround for startup with a special bundle
> > which is a fake "Application" in order to start JavaFX engine.
> >
> > JP
> >
> > -----Message d'origine-----
> > De : Chuck Davis [mailto:[email protected]] Envoyé : dimanche 9
> > juillet 2017 18:17 À : [email protected] Objet : Re: Felix and
> > JavaFX
> >
> > I spent most of the day yesterday googling to find out if there is a
> > way to build a JavaFX desktop application based upon Felix. So far
> > I've not found anything that advises how to do this or if it is even
> > possible at this stage of development.
> >
> > Can anybody point me to an article that explains how, if this can be
> done?
> >
> > TIA.
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]