You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Chuck Davis <cj...@gmail.com> on 2017/07/09 16:16:54 UTC

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.

Re: Antwort: RE: Felix and JavaFX

Posted by Jerome Pommier <je...@yahoo.fr>.
I can't remember where I found the following allowing me to very simply
launch OSGI-JAVAFX apps, but I give here a skeleton that I use everywhere.
The  point is that I'm using NetBeans platform, and Ant, (it seems to be
also your case) because I can't be be connected to www.
The local Ant build's file for NetBeans is changed according to:

<?xml version="1.0" encoding="UTF-8"?>
<project name="test" default="default" basedir=".">
    <description>Builds, tests, and runs the project test.</description>
    <import file="nbproject/build-impl.xml"/>
    <property name="felix.dir" value="../../osgi_lib/tasks"/>  
    <property name="test.dir" value=".."/>  
    <taskdef name="ipojo"
             classname="org.apache.felix.ipojo.task.IPojoTask"
            
classpath="${felix.dir}/org.apache.felix.ipojo.ant-1.12.1.jar"/>
    <taskdef resource="aQute/bnd/ant/taskdef.properties" 
             classpath="${felix.dir}/bnd-1.50.0.jar"/>    
    <target depends="init,compile,-pre-pre-jar" name="-do-jar">
        <bnd 
            classpath="${build.dir}/classes" 
            files="bind.bnd"
            output="${dist.jar}"
            failok="false" 
            exceptions="true"   />   
        <ipojo input="${dist.jar}" classpath="${javac.classpath}" />  
        <copy file="${dist.jar}" todir="${test.dir}/bundles"/> 
    </target> 
</project>

Futhermore, in the config file I added these lines:

# To append packages to the default set of exported system packages,
# set this value.
org.osgi.framework.system.packages.extra=javafx.application;version=0.0.0, \
com.sun.browser.plugin; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx.ui; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx.ui.resources; version=0.0.0, \
com.sun.deploy.uitoolkit.impl.fx.ui.resources.image; version=0.0.0, \
com.sun.glass.events; version=0.0.0, \
com.sun.glass.ui; version=0.0.0, \
com.sun.glass.ui.delegate; version=0.0.0, \
com.sun.glass.ui.gtk; version=0.0.0, \
com.sun.glass.ui.mac; version=0.0.0, \
com.sun.glass.ui.win; version=0.0.0, \
com.sun.glass.ui.x11; version=0.0.0, \
com.sun.glass.utils; version=0.0.0, \
com.sun.javafx; version=0.0.0, \
com.sun.javafx.animation; version=0.0.0, \
com.sun.javafx.animation.transition; version=0.0.0, \
com.sun.javafx.applet; version=0.0.0, \
com.sun.javafx.application; version=0.0.0, \
com.sun.javafx.beans; version=0.0.0, \
com.sun.javafx.beans.annotations; version=0.0.0, \
com.sun.javafx.beans.event; version=0.0.0, \
com.sun.javafx.binding; version=0.0.0, \
com.sun.javafx.charts; version=0.0.0, \
com.sun.javafx.collections; version=0.0.0, \
com.sun.javafx.collections.annotations; version=0.0.0, \
com.sun.javafx.collections.transformation; version=0.0.0, \
com.sun.javafx.css; version=0.0.0, \
com.sun.javafx.css.converters; version=0.0.0, \
com.sun.javafx.css.parser; version=0.0.0, \
com.sun.javafx.cursor; version=0.0.0, \
com.sun.javafx.effect; version=0.0.0, \
com.sun.javafx.embed; version=0.0.0, \
com.sun.javafx.event; version=0.0.0, \
com.sun.javafx.font; version=0.0.0, \
com.sun.javafx.fxml; version=0.0.0, \
com.sun.javafx.fxml.builder; version=0.0.0, \
com.sun.javafx.fxml.expression; version=0.0.0, \
com.sun.javafx.geom; version=0.0.0, \
com.sun.javafx.geom.transform; version=0.0.0, \
com.sun.javafx.iio; version=0.0.0, \
com.sun.javafx.iio.bmp; version=0.0.0, \
com.sun.javafx.iio.common; version=0.0.0, \
com.sun.javafx.iio.gif; version=0.0.0, \
com.sun.javafx.iio.jpeg; version=0.0.0, \
com.sun.javafx.iio.png; version=0.0.0, \
com.sun.javafx.image; version=0.0.0, \
com.sun.javafx.image.impl; version=0.0.0, \
com.sun.javafx.jmx; version=0.0.0, \
com.sun.javafx.logging; version=0.0.0, \
com.sun.javafx.menu; version=0.0.0, \
com.sun.javafx.perf; version=0.0.0, \
com.sun.javafx.property; version=0.0.0, \
com.sun.javafx.property.adapter; version=0.0.0, \
com.sun.javafx.robot; version=0.0.0, \
com.sun.javafx.robot.impl; version=0.0.0, \
com.sun.javafx.runtime; version=0.0.0, \
com.sun.javafx.runtime.async; version=0.0.0, \
com.sun.javafx.runtime.eula; version=0.0.0, \
com.sun.javafx.scene; version=0.0.0, \
com.sun.javafx.scene.control; version=0.0.0, \
com.sun.javafx.scene.control.behavior; version=0.0.0, \
com.sun.javafx.scene.control.skin; version=0.0.0, \
com.sun.javafx.scene.control.skin.caspian; version=0.0.0, \
com.sun.javafx.scene.control.skin.resources; version=0.0.0, \
com.sun.javafx.scene.input; version=0.0.0, \
com.sun.javafx.scene.layout.region; version=0.0.0, \
com.sun.javafx.scene.paint; version=0.0.0, \
com.sun.javafx.scene.shape; version=0.0.0, \
com.sun.javafx.scene.text; version=0.0.0, \
com.sun.javafx.scene.transform; version=0.0.0, \
com.sun.javafx.scene.traversal; version=0.0.0, \
com.sun.javafx.scene.web; version=0.0.0, \
com.sun.javafx.scene.web.behavior; version=0.0.0, \
com.sun.javafx.scene.web.skin; version=0.0.0, \
com.sun.javafx.sg; version=0.0.0, \
com.sun.javafx.sg.prism; version=0.0.0, \
com.sun.javafx.stage; version=0.0.0, \
com.sun.javafx.tk; version=0.0.0, \
com.sun.javafx.tk.desktop; version=0.0.0, \
com.sun.javafx.tk.quantum; version=0.0.0, \
com.sun.javafx.util; version=0.0.0, \
com.sun.media.jfxmedia; version=0.0.0, \
com.sun.media.jfxmedia.control; version=0.0.0, \
com.sun.media.jfxmedia.effects; version=0.0.0, \
com.sun.media.jfxmedia.events; version=0.0.0, \
com.sun.media.jfxmedia.locator; version=0.0.0, \
com.sun.media.jfxmedia.logging; version=0.0.0, \
com.sun.media.jfxmedia.track; version=0.0.0, \
com.sun.media.jfxmediaimpl; version=0.0.0, \
com.sun.media.jfxmediaimpl.platform; version=0.0.0, \
com.sun.media.jfxmediaimpl.platform.gstreamer; version=0.0.0, \
com.sun.media.jfxmediaimpl.platform.java; version=0.0.0, \
com.sun.media.jfxmediaimpl.platform.osx; version=0.0.0, \
com.sun.openpisces; version=0.0.0, \
com.sun.prism; version=0.0.0, \
com.sun.prism.camera; version=0.0.0, \
com.sun.prism.d3d; version=0.0.0, \
com.sun.prism.d3d.hlsl; version=0.0.0, \
com.sun.prism.image; version=0.0.0, \
com.sun.prism.impl; version=0.0.0, \
com.sun.prism.impl.packrect; version=0.0.0, \
com.sun.prism.impl.paint; version=0.0.0, \
com.sun.prism.impl.ps; version=0.0.0, \
com.sun.prism.impl.shape; version=0.0.0, \
com.sun.prism.j2d; version=0.0.0, \
com.sun.prism.j2d.paint; version=0.0.0, \
com.sun.prism.paint; version=0.0.0, \
com.sun.prism.ps; version=0.0.0, \
com.sun.prism.render; version=0.0.0, \
com.sun.prism.shader; version=0.0.0, \
com.sun.prism.shape; version=0.0.0, \
com.sun.prism.tkal; version=0.0.0, \
com.sun.prism.util.tess; version=0.0.0, \
com.sun.prism.util.tess.impl.tess; version=0.0.0, \
com.sun.scenario; version=0.0.0, \
com.sun.scenario.animation; version=0.0.0, \
com.sun.scenario.animation.shared; version=0.0.0, \
com.sun.scenario.effect; version=0.0.0, \
com.sun.scenario.effect.impl; version=0.0.0, \
com.sun.scenario.effect.impl.hw; version=0.0.0, \
com.sun.scenario.effect.impl.hw.d3d; version=0.0.0, \
com.sun.scenario.effect.impl.hw.d3d.hlsl; version=0.0.0, \
com.sun.scenario.effect.impl.prism; version=0.0.0, \
com.sun.scenario.effect.impl.prism.ps; version=0.0.0, \
com.sun.scenario.effect.impl.prism.sw; version=0.0.0, \
com.sun.scenario.effect.impl.state; version=0.0.0, \
com.sun.scenario.effect.impl.sw; version=0.0.0, \
com.sun.scenario.effect.impl.sw.java; version=0.0.0, \
com.sun.scenario.effect.impl.sw.sse; version=0.0.0, \
com.sun.scenario.effect.light; version=0.0.0, \
com.sun.t2k; version=0.0.0, \
com.sun.webpane.perf; version=0.0.0, \
com.sun.webpane.platform; version=0.0.0, \
com.sun.webpane.platform.event; version=0.0.0, \
com.sun.webpane.platform.graphics; version=0.0.0, \
com.sun.webpane.sg; version=0.0.0, \
com.sun.webpane.sg.prism; version=0.0.0, \
com.sun.webpane.sg.prism.resources; version=0.0.0, \
com.sun.webpane.sg.prism.theme; version=0.0.0, \
com.sun.webpane.sg.theme; version=0.0.0, \
com.sun.webpane.webkit; version=0.0.0, \
com.sun.webpane.webkit.dom; version=0.0.0, \
com.sun.webpane.webkit.network; version=0.0.0, \
com.sun.webpane.webkit.network.about; version=0.0.0, \
com.sun.webpane.webkit.network.data; version=0.0.0, \
com.sun.webpane.webkit.unicode; version=0.0.0, \
javafx.animation; version=0.0.0, \
javafx.beans; version=0.0.0, \
javafx.beans.binding; version=0.0.0, \
javafx.beans.property; version=0.0.0, \
javafx.beans.property.adapter; version=0.0.0, \
javafx.beans.value; version=0.0.0, \
javafx.collections; version=0.0.0, \
javafx.collections.transformation; version=0.0.0, \
javafx.concurrent; version=0.0.0, \
javafx.embed.swing; version=0.0.0, \
javafx.embed.swt; version=0.0.0, \
javafx.event; version=0.0.0, \
javafx.fxml; version=0.0.0, \
javafx.geometry; version=0.0.0, \
javafx.scene; version=0.0.0, \
javafx.scene.canvas; version=0.0.0, \
javafx.scene.chart; version=0.0.0, \
javafx.scene.control; version=0.0.0, \
javafx.scene.control.cell; version=0.0.0, \
javafx.scene.effect; version=0.0.0, \
javafx.scene.image; version=0.0.0, \
javafx.scene.input; version=0.0.0, \
javafx.scene.layout; version=0.0.0, \
javafx.scene.media; version=0.0.0, \
javafx.scene.paint; version=0.0.0, \
javafx.scene.shape; version=0.0.0, \
javafx.scene.text; version=0.0.0, \
javafx.scene.transform; version=0.0.0, \
javafx.scene.web; version=0.0.0, \
javafx.stage; version=0.0.0, \
javafx.util; version=0.0.0, \
javafx.util.converter; version=0.0.0, \
netscape.javascript; version=0.0.0

for JAVAFX classes to be imported. Also note that sometimes, JAVAFX classes
that are not in your java file's import section, must explicitly appeared in
the import-package's declaration of the bnd file. However Felix flags these
missing classes  at run time.

*I) StageService bundle*
The first bundle is a simple service

package em.widget.stage.service;

import javafx.stage.Stage;

public interface StageService {

    public String STAGE_NAME = "stage.name";

    public Stage getStage();
}

with a simple method getStage(). Each JAVAFX widget (a Stage in JAVAFX
defining a "window" on the screen) implements this service. Its name is the
service property's String defined by STAGE_NAME.

*II) JAVAFX Launching bundle*
The following lines are the JAVAFX launcher. They implement a StageService
with no name.

package em.widget.stage.impl;

import em.widget.stage.service.StageService;
import java.util.concurrent.Executors;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Application;
import javafx.stage.Stage;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Provides;

@Component
@Provides
public class StageImpl extends Application implements StageService {

    private static Stage pstage = null;
    private static Thread t;

    /**
     * The local Stage is sets.
     *
     * @param primaryStage The stage
     * @throws Exception
     */
    @Override
    public void start(Stage primaryStage) throws Exception {
        pstage = primaryStage;
        synchronized (t) {
            t.notify();
        }
    }

    @Override
    public Stage getStage() {
        if (pstage == null) {
            Executors.defaultThreadFactory().newThread(() -> {
               
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
                launch();
            }).start();
            t = Thread.currentThread();
            synchronized (t) {
                try {
                    t.wait();
                } catch (InterruptedException ex) {
                   
Logger.getLogger(StageService.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        }
        return pstage;
    }
}

*III) Defining your widget.*
You have now to write your widgets like the following one which is a JAVAFX
interface to connection's parameters. The fxml file is within the package
directory, and the four lines below DBWidget's creator take into account the
special OSGI class loader. Everything else is usual in JAVAFX apps.

package em.widget.connection.impl;

import em.persistence.service.ConnectionService;
import em.widget.stage.service.StageService;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.FXMLLoader;
import javafx.fxml.JavaFXBuilderFactory;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.PasswordField;
import javafx.scene.control.TextField;
import javafx.stage.Stage;
import javafx.stage.WindowEvent;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Context;
import org.apache.felix.ipojo.annotations.Provides;
import org.apache.felix.ipojo.annotations.Requires;
import org.apache.felix.ipojo.annotations.ServiceProperty;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import em.widget.datas.service.DatasWidgetService;
import org.osgi.framework.BundleException;

@Component
@Provides
public class ConnectionWidgetImpl implements StageService {

    @FXML
    TextField adminuser, user, dbname, ip, port, threadnumber;
    @FXML
    PasswordField adminpassword, password;
    @FXML
    Button button1;

    @Context
    BundleContext context;
    @Requires
    ConnectionService connectionService;

    @ServiceProperty(name = STAGE_KIND)
    String kind;
    Stage theStage;
    Boolean connected = false;
    DatasWidgetService datasWidgetService;
    ChangeListener<String> threadsNumberListener = new
ChangeListener<String>() {
        @Override
        public void changed(ObservableValue<? extends String> observable,
String oldValue, String newValue) {
            try {
                double t = Integer.valueOf(newValue);
                if (t <= 0) {
                    threadnumber.setText(oldValue);
                }
            } catch (NumberFormatException nfe) {
                threadnumber.setText("1");
            }
        }
    };

    public ConnectionWidgetImpl() {
        FXMLLoader fxmlLoader = new FXMLLoader();
        fxmlLoader.setBuilderFactory(new JavaFXBuilderFactory());
        FXMLLoader.setDefaultClassLoader(getClass().getClassLoader());
        fxmlLoader.setLocation(getClass().getResource("Widget.fxml"));
        // Avoid the controller in fxml file, and declares itself as the
controller
        fxmlLoader.setController(this);
        theStage = new Stage();
        theStage.setOnCloseRequest(new EventHandler<WindowEvent>() {
            @Override
            public void handle(WindowEvent event) {
                try {
                    ServiceReference[] sr =
context.getServiceReferences(StageService.class.getName(), "(" +
StageService.STAGE_KIND + "=*)");
                    for (ServiceReference sr1 : sr) {
                        ((StageService)
context.getService(sr1)).getStage().close();
                    }
                    context.getBundle(0).stop();
                } catch (InvalidSyntaxException | BundleException ex) {
                   
Logger.getLogger(ConnectionWidgetImpl.class.getName()).log(Level.SEVERE,
null, ex);
                }
            }
        });
        try {
            theStage.setTitle("DataBase Connection");
            theStage.setScene(new Scene(fxmlLoader.load()));
        } catch (IOException ex) {
           
Logger.getLogger(ConnectionWidgetImpl.class.getName()).log(Level.SEVERE,
null, ex);
        }
       
adminuser.textProperty().bindBidirectional(connectionService.getAdminUser());
        ip.textProperty().bindBidirectional(connectionService.getIP());
        port.textProperty().bindBidirectional(connectionService.getPort());
        user.textProperty().bindBidirectional(connectionService.getUser());
       
dbname.textProperty().bindBidirectional(connectionService.getDBName());
       
adminpassword.textProperty().bindBidirectional(connectionService.getAdminPassword());
       
password.textProperty().bindBidirectional(connectionService.getPassword());
        threadnumber.textProperty().addListener(threadsNumberListener);
       
threadnumber.textProperty().bindBidirectional(connectionService.getThreadsNumber());
        button1.setText("Connect");
        button1.setStyle("-fx-color:tomato");
    }

    @Override
    public Stage getStage() {
        return theStage;
    }

    @FXML
    public void connect(ActionEvent ae) {
......
    }
*IV) Starting your app*
After calling "mainStageService.getStage();" in the following code, the
JAVAFX thread is running, and it's simple for the previous widget to be
displayed on screen.

package em.test;

import java.util.Properties;
import org.apache.felix.ipojo.ConfigurationException;
import org.apache.felix.ipojo.Factory;
import org.apache.felix.ipojo.MissingHandlerException;
import org.apache.felix.ipojo.UnacceptableConfiguration;
import org.apache.felix.ipojo.annotations.Component;
import org.apache.felix.ipojo.annotations.Context;
import org.apache.felix.ipojo.annotations.Instantiate;
import org.apache.felix.ipojo.annotations.Requires;
import org.osgi.framework.BundleContext;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.ServiceReference;
import em.widget.stage.service.StageService;
import java.util.logging.Level;
import java.util.logging.Logger;
import javafx.application.Platform;

@Component
@Instantiate
public class DBWidget {

    @Context
    BundleContext context;
    @Requires(filter =
"(factory.name=em.widget.connection.impl.ConnectionWidgetImpl)")
    Factory persistenceStageFactory;


    public DBWidget()  {
        // Creating the mainstage object
        mainStageFactory.createComponentInstance(null);
        ServiceReference<StageService> stageServiceRef =
context.getServiceReference(StageService.class);
        StageService mainStageService = (StageService)
context.getService(stageServiceRef);
        // Then start the FX thread
        mainStageService.getStage();

        // Creates a widget on FX thread.
        Platform.runLater(new Runnable() {
            @Override
            public void run() {
                try {
                    Properties d = new Properties();
                    d.put(StageService.STAGE_KIND, "DBConnect");
                    persistenceStageFactory.createComponentInstance(d);
                    ServiceReference[] sr =
context.getServiceReferences(StageService.class.getName(), "(" +
StageService.STAGE_KIND + "=DBConnect)");
                    StageService persistentStageService = (StageService)
context.getService(sr[0]);
                    // show the connect widget
                    persistentStageService.getStage().show();
                } catch (UnacceptableConfiguration | MissingHandlerException
| ConfigurationException | InvalidSyntaxException ex) {
                    Logger.getLogger(getClass().getName()).log(Level.SEVERE,
null, ex);
                }
            }
        });
 	.......



--
View this message in context: http://apache-felix.18485.x6.nabble.com/Re-Felix-and-JavaFX-tp5021784p5021880.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Antwort: RE: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
JP:

Thanks for the additional information.  I've seen some indication that the
Felix team are considering how to handle the JavaFX issues as well.
Perhaps it is time to investigate Karaf further -- but it adds a lot of
additional capabilities that a client doesn't actually need if I understand
correctly.   When I get back to programming I'll have to investigate
further the options offered by Karaf.  Right now I'm concentrating on
getting my knee replacement to respond to therapy.  Narcotics make me feel
and act loopy so best I absent myself for a while.  But I suspect I'm not
the only one interested in this subject and I suppose others will chime in
as time passes.

On Thu, Jul 20, 2017 at 5:25 AM, CLEMENT Jean-Philippe <
jean-philippe.clement@fr.thalesgroup.com> wrote:

> 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
>
>
>
>

Re: Antwort: RE: Felix and JavaFX

Posted by Neil Bartlett <nj...@gmail.com>.
In fact you ARE doing the things explained in Paul Bakker’s article. Or rather, Karaf does them for you: it sets up the system bundle exports using the contents of jre.properties.

By default Felix (and all other OSGi frameworks that I’m aware of) exports only the JavaSE standard packages. JavaFX is not part of JavaSE standard, therefore it is not exported by default. Somebody has to add its packages to the system bundle exports — you can do this yourself with a single line of code, or you can drag in all the dependencies of Karaf. I know which I would choose.

Regards,
Neil

> On 20 Jul 2017, at 13:25, CLEMENT Jean-Philippe <je...@fr.thalesgroup.com> wrote:
> 
> 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 : marc.schlegel@sdv-it.de [mailto:marc.schlegel@sdv-it.de] 
> Envoyé : jeudi 20 juillet 2017 13:50
> À : users@felix.apache.org
> 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 <je...@fr.thalesgroup.com>
> An:     "users@felix.apache.org" <us...@felix.apache.org>, 
> 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:cjgunzel@gmail.com] Envoyé : jeudi 20 juillet 2017 05:32 À : users@felix.apache.org Objet : Re: Felix and JavaFX
> 
> All the ones Paul's article delineates.
> 
> On Tue, Jul 18, 2017 at 8:12 AM, CLEMENT Jean-Philippe < jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : lundi 17 juillet
>> 2017 18:41 À : users@felix.apache.org 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 < 
>> jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : dimanche 9 
>>> juillet 2017 18:17 À : users@felix.apache.org 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: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Antwort: RE: Felix and JavaFX

Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
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 : marc.schlegel@sdv-it.de [mailto:marc.schlegel@sdv-it.de] 
Envoyé : jeudi 20 juillet 2017 13:50
À : users@felix.apache.org
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 <je...@fr.thalesgroup.com>
An:     "users@felix.apache.org" <us...@felix.apache.org>, 
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:cjgunzel@gmail.com] Envoyé : jeudi 20 juillet 2017 05:32 À : users@felix.apache.org Objet : Re: Felix and JavaFX

All the ones Paul's article delineates.

On Tue, Jul 18, 2017 at 8:12 AM, CLEMENT Jean-Philippe < jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : lundi 17 juillet
> 2017 18:41 À : users@felix.apache.org 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 < 
> jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : dimanche 9 
> > juillet 2017 18:17 À : users@felix.apache.org 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Antwort: RE: Felix and JavaFX

Posted by ma...@sdv-it.de.
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 <je...@fr.thalesgroup.com>
An:     "users@felix.apache.org" <us...@felix.apache.org>, 
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:cjgunzel@gmail.com] 
Envoyé : jeudi 20 juillet 2017 05:32
À : users@felix.apache.org
Objet : Re: Felix and JavaFX

All the ones Paul's article delineates.

On Tue, Jul 18, 2017 at 8:12 AM, CLEMENT Jean-Philippe < 
jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : lundi 17 juillet 
> 2017 18:41 À : users@felix.apache.org 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 < 
> jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : dimanche 9 
> > juillet 2017 18:17 À : users@felix.apache.org 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


RE: Felix and JavaFX

Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
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:cjgunzel@gmail.com] 
Envoyé : jeudi 20 juillet 2017 05:32
À : users@felix.apache.org
Objet : Re: Felix and JavaFX

All the ones Paul's article delineates.

On Tue, Jul 18, 2017 at 8:12 AM, CLEMENT Jean-Philippe < jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : lundi 17 juillet 
> 2017 18:41 À : users@felix.apache.org 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 < 
> jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : dimanche 9 
> > juillet 2017 18:17 À : users@felix.apache.org 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

Re: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
All the ones Paul's article delineates.

On Tue, Jul 18, 2017 at 8:12 AM, CLEMENT Jean-Philippe <
jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com]
> Envoyé : lundi 17 juillet 2017 18:41
> À : users@felix.apache.org
> 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 <
> jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : dimanche 9
> > juillet 2017 18:17 À : users@felix.apache.org 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: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>

RE: Felix and JavaFX

Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
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:cjgunzel@gmail.com] 
Envoyé : lundi 17 juillet 2017 18:41
À : users@felix.apache.org
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 < jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com] Envoyé : dimanche 9 
> juillet 2017 18:17 À : users@felix.apache.org 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

Re: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
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 <
jean-philippe.clement@fr.thalesgroup.com> 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:cjgunzel@gmail.com]
> Envoyé : dimanche 9 juillet 2017 18:17
> À : users@felix.apache.org
> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

RE: Felix and JavaFX

Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
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:cjgunzel@gmail.com] 
Envoyé : dimanche 9 juillet 2017 18:17
À : users@felix.apache.org
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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org

Re: Felix and JavaFX

Posted by Oliver Lietz <ap...@oliverlietz.de>.
On Sunday 09 July 2017 15:50:51 Chuck Davis wrote:
> Hi Neil:

Hi Chuck,

> I'm just beginning my investigation of OSGi because I want to do things
> that it sounds like OSGi was designed to do and I'm too lazy to reinvent
> the wheel if it already exists.  I develop desktop business applications
> and my development style is already quite modular in concept but I want to
> get to the next level of modularity.
> 
> Paul's article hits the nail on the head with what I am hung up on in the
> "Importing JavaFX Packages" subsection.  That is the first problem and Paul
> lays out that there are more ahead before/if I achieve victory.

see https://issues.apache.org/jira/browse/FELIX-5558

You basically setup the OSGi framework in your main method, register screen 
and primary stage as services in (Application) start method and shutdown the 
framework in (Application) stop method. The hardest part is to get all third-
party dependencies playing nice.

I'm using maven-bundle-plugin and javafx-maven-plugin.

> I've done a bit more reading and it sounds like the Bndtools he endorses
> from Eclipse is just a more user-friendly version of Bnd so maybe I can
> find a way to use the Bnd tool directly.....many challenges lie ahead it
> sound like.
> 
> Thanks for your interest.

Regards,
O.

> On Sun, Jul 9, 2017 at 10:24 AM, Neil Bartlett <nj...@gmail.com> wrote:
> > Hi Chuck,
> > 
> > Using Eclipse as an IDE does not tie you into using Equinox for your
> > runtime.
> > 
> > I don’t know much about JavaFX but what is the actual problem you are
> > experiencing with it? Isn’t it just a library like any other?
> > 
> > Neil
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
Thanks Renato.  I'll investigate that project...sounds like a real time
saver.  At least get me to the next problem that Paul's article lays out...

On Sun, Jul 9, 2017 at 3:00 PM, Paulo Renato de Athaydes <
renatoathaydes@hotmail.com> wrote:

> It's hard because Felix does not (or did not used to at least) export the
> javafx classes to bundles.
>
>
> This project fixes that:
>
>
> https://github.com/edvin/javafx-osgi
>
> [https://avatars0.githubusercontent.com/u/977035?v=3&s=400]<https://
> github.com/edvin/javafx-osgi>
>
> edvin/javafx-osgi<https://github.com/edvin/javafx-osgi>
> github.com
> javafx-osgi - JavaFX 8.0 OSGi bundle to support JavaFX in an OSGi container
>
>
>
>
>
> Hope it helps,
>
>
> Renato
>
>
> ________________________________
> De: Neil Bartlett <nj...@gmail.com>
> Enviado: segunda-feira, 10 de julho de 2017 03:24
> Para: users@felix.apache.org
> Assunto: Re: Felix and JavaFX
>
> Hi Chuck,
>
> Using Eclipse as an IDE does not tie you into using Equinox for your
> runtime.
>
> I don’t know much about JavaFX but what is the actual problem you are
> experiencing with it? Isn’t it just a library like any other?
>
> Neil
>
> > On 9 Jul 2017, at 18:18, Chuck Davis <cj...@gmail.com> wrote:
> >
> > Thanks Bram.  I actually read that yesterday but unfortunately it's
> Eclipse
> > related and that ties me to Equinox.  So far I haven't found anything to
> > like about Eclipse and I want true OSGi compatibility -- not tied to a
> > specific IDE or OSGi implementation.  At least the Eclipse people are
> > wrestling with the issue and that is a good sign.  I've done some of the
> > e(fx)clipse tutorials as well but, again, it makes me dependent on
> specific
> > implementations.
> >
> > I'm going to re-read the article and see if I've missed something
> > though.....
> >
> > Again, thanks for your interest.
> >
> >
> > On Sun, Jul 9, 2017 at 10:10 AM, Bram Pouwelse <br...@pouwelse.com>
> wrote:
> >
> >> Hi Chuck,
> >>
> >> It's an old post but could be what you're looking for
> >>
> >> http://paulonjava.blogspot.nl/2014/11/making-javafx-better-
> Java, OSGi, Amdatu and a bit of JavaScript<http://paulonjava.
> blogspot.nl/2014/11/making-javafx-better->
> paulonjava.blogspot.nl
> Blog about creating modular Java applications with OSGi, Amdatu and a bit
> of JavaScript.
>
>
>
> >> with-osgi.html?m=1
> >>
> >> Regards,
> >> Bram
> >>
> >> Op 9 jul. 2017 19:05 schreef "Chuck Davis" <cj...@gmail.com>:
> >>
> >>> Thanks Thomas.  I guess there must be a way.  I wish he would have just
> >>> explained how to use JavaFX with Felix rather than develop a whole
> third
> >>> party development environment.....
> >>>
> >>> On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <
> >>> thomas.driessen@ds-lab.org>
> >>> wrote:
> >>>
> >>>> Hi Chuck,
> >>>>
> >>>> maybe this Project is an interesting starting Point for you:
> >>>> http://www.drombler.org
> Drombler<http://www.drombler.org/>
> www.drombler.org
> This is the home of the Open Source projects maintained by Drombler.
> Drombler FX. Drombler FX - the modular application framework for JavaFX.
> Drombler ACP
>
>
>
> >>>>
> >>>> Kind regards,
> >>>> Thomas
> >>>>
> >>>> Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
> >>>>
> >>>>> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Felix and JavaFX

Posted by Paulo Renato de Athaydes <re...@hotmail.com>.
It's hard because Felix does not (or did not used to at least) export the javafx classes to bundles.


This project fixes that:


https://github.com/edvin/javafx-osgi

[https://avatars0.githubusercontent.com/u/977035?v=3&s=400]<https://github.com/edvin/javafx-osgi>

edvin/javafx-osgi<https://github.com/edvin/javafx-osgi>
github.com
javafx-osgi - JavaFX 8.0 OSGi bundle to support JavaFX in an OSGi container





Hope it helps,


Renato


________________________________
De: Neil Bartlett <nj...@gmail.com>
Enviado: segunda-feira, 10 de julho de 2017 03:24
Para: users@felix.apache.org
Assunto: Re: Felix and JavaFX

Hi Chuck,

Using Eclipse as an IDE does not tie you into using Equinox for your runtime.

I don’t know much about JavaFX but what is the actual problem you are experiencing with it? Isn’t it just a library like any other?

Neil

> On 9 Jul 2017, at 18:18, Chuck Davis <cj...@gmail.com> wrote:
>
> Thanks Bram.  I actually read that yesterday but unfortunately it's Eclipse
> related and that ties me to Equinox.  So far I haven't found anything to
> like about Eclipse and I want true OSGi compatibility -- not tied to a
> specific IDE or OSGi implementation.  At least the Eclipse people are
> wrestling with the issue and that is a good sign.  I've done some of the
> e(fx)clipse tutorials as well but, again, it makes me dependent on specific
> implementations.
>
> I'm going to re-read the article and see if I've missed something
> though.....
>
> Again, thanks for your interest.
>
>
> On Sun, Jul 9, 2017 at 10:10 AM, Bram Pouwelse <br...@pouwelse.com> wrote:
>
>> Hi Chuck,
>>
>> It's an old post but could be what you're looking for
>>
>> http://paulonjava.blogspot.nl/2014/11/making-javafx-better-
Java, OSGi, Amdatu and a bit of JavaScript<http://paulonjava.blogspot.nl/2014/11/making-javafx-better->
paulonjava.blogspot.nl
Blog about creating modular Java applications with OSGi, Amdatu and a bit of JavaScript.



>> with-osgi.html?m=1
>>
>> Regards,
>> Bram
>>
>> Op 9 jul. 2017 19:05 schreef "Chuck Davis" <cj...@gmail.com>:
>>
>>> Thanks Thomas.  I guess there must be a way.  I wish he would have just
>>> explained how to use JavaFX with Felix rather than develop a whole third
>>> party development environment.....
>>>
>>> On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <
>>> thomas.driessen@ds-lab.org>
>>> wrote:
>>>
>>>> Hi Chuck,
>>>>
>>>> maybe this Project is an interesting starting Point for you:
>>>> http://www.drombler.org
Drombler<http://www.drombler.org/>
www.drombler.org
This is the home of the Open Source projects maintained by Drombler. Drombler FX. Drombler FX - the modular application framework for JavaFX. Drombler ACP



>>>>
>>>> Kind regards,
>>>> Thomas
>>>>
>>>> Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
>>>>
>>>>> 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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix and JavaFX

Posted by Neil Bartlett <nj...@gmail.com>.
Hi Chuck,

I read through Paul’s article and it still looks very relevant and well written.

You don’t really want to use bnd directly. It’s a low-level tool… it would be like using javac and the jar tool directly from the command line, rather than via a build system. Does anybody still do that?? Fortunately the Maven integration for bnd has improved markedly since Paul’s article was written, you can read about the suite of plugins available here: https://github.com/bndtools/bnd/tree/master/maven <https://github.com/bndtools/bnd/tree/master/maven>

Regards,
Neil


> On 9 Jul 2017, at 23:50, Chuck Davis <cj...@gmail.com> wrote:
> 
> Hi Neil:
> 
> I'm just beginning my investigation of OSGi because I want to do things
> that it sounds like OSGi was designed to do and I'm too lazy to reinvent
> the wheel if it already exists.  I develop desktop business applications
> and my development style is already quite modular in concept but I want to
> get to the next level of modularity.
> 
> Paul's article hits the nail on the head with what I am hung up on in the
> "Importing JavaFX Packages" subsection.  That is the first problem and Paul
> lays out that there are more ahead before/if I achieve victory.
> 
> I've done a bit more reading and it sounds like the Bndtools he endorses
> from Eclipse is just a more user-friendly version of Bnd so maybe I can
> find a way to use the Bnd tool directly.....many challenges lie ahead it
> sound like.
> 
> Thanks for your interest.
> 
> 
> 
> On Sun, Jul 9, 2017 at 10:24 AM, Neil Bartlett <nj...@gmail.com> wrote:
> 
>> Hi Chuck,
>> 
>> Using Eclipse as an IDE does not tie you into using Equinox for your
>> runtime.
>> 
>> I don’t know much about JavaFX but what is the actual problem you are
>> experiencing with it? Isn’t it just a library like any other?
>> 
>> Neil
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


Re: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
Hi Neil:

I'm just beginning my investigation of OSGi because I want to do things
that it sounds like OSGi was designed to do and I'm too lazy to reinvent
the wheel if it already exists.  I develop desktop business applications
and my development style is already quite modular in concept but I want to
get to the next level of modularity.

Paul's article hits the nail on the head with what I am hung up on in the
"Importing JavaFX Packages" subsection.  That is the first problem and Paul
lays out that there are more ahead before/if I achieve victory.

I've done a bit more reading and it sounds like the Bndtools he endorses
from Eclipse is just a more user-friendly version of Bnd so maybe I can
find a way to use the Bnd tool directly.....many challenges lie ahead it
sound like.

Thanks for your interest.



On Sun, Jul 9, 2017 at 10:24 AM, Neil Bartlett <nj...@gmail.com> wrote:

> Hi Chuck,
>
> Using Eclipse as an IDE does not tie you into using Equinox for your
> runtime.
>
> I don’t know much about JavaFX but what is the actual problem you are
> experiencing with it? Isn’t it just a library like any other?
>
> Neil
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Felix and JavaFX

Posted by Bram Pouwelse <br...@pouwelse.com>.
Hi Chuck,

Had another look as I would've been supirised if Paul was using Equinox ;)
but I don't see anything related to that, and the sample on that's on
GitHub runs on Felix [1]

So Eclipse (with Bndtools) is only used as IDE  and as Niel already
mentioned that doesn't force you to use Equinox

Regards,
Bram

1:
https://github.com/paulbakker/javafx-osgi-example/blob/master/run/demo.bndrun

On Sun, Jul 9, 2017 at 7:24 PM Neil Bartlett <nj...@gmail.com> wrote:

> Hi Chuck,
>
> Using Eclipse as an IDE does not tie you into using Equinox for your
> runtime.
>
> I don’t know much about JavaFX but what is the actual problem you are
> experiencing with it? Isn’t it just a library like any other?
>
> Neil
>
> > On 9 Jul 2017, at 18:18, Chuck Davis <cj...@gmail.com> wrote:
> >
> > Thanks Bram.  I actually read that yesterday but unfortunately it's
> Eclipse
> > related and that ties me to Equinox.  So far I haven't found anything to
> > like about Eclipse and I want true OSGi compatibility -- not tied to a
> > specific IDE or OSGi implementation.  At least the Eclipse people are
> > wrestling with the issue and that is a good sign.  I've done some of the
> > e(fx)clipse tutorials as well but, again, it makes me dependent on
> specific
> > implementations.
> >
> > I'm going to re-read the article and see if I've missed something
> > though.....
> >
> > Again, thanks for your interest.
> >
> >
> > On Sun, Jul 9, 2017 at 10:10 AM, Bram Pouwelse <br...@pouwelse.com>
> wrote:
> >
> >> Hi Chuck,
> >>
> >> It's an old post but could be what you're looking for
> >>
> >> http://paulonjava.blogspot.nl/2014/11/making-javafx-better-
> >> with-osgi.html?m=1
> >>
> >> Regards,
> >> Bram
> >>
> >> Op 9 jul. 2017 19:05 schreef "Chuck Davis" <cj...@gmail.com>:
> >>
> >>> Thanks Thomas.  I guess there must be a way.  I wish he would have just
> >>> explained how to use JavaFX with Felix rather than develop a whole
> third
> >>> party development environment.....
> >>>
> >>> On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <
> >>> thomas.driessen@ds-lab.org>
> >>> wrote:
> >>>
> >>>> Hi Chuck,
> >>>>
> >>>> maybe this Project is an interesting starting Point for you:
> >>>> http://www.drombler.org
> >>>>
> >>>> Kind regards,
> >>>> Thomas
> >>>>
> >>>> Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
> >>>>
> >>>>> 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: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: Felix and JavaFX

Posted by Neil Bartlett <nj...@gmail.com>.
Hi Chuck,

Using Eclipse as an IDE does not tie you into using Equinox for your runtime.

I don’t know much about JavaFX but what is the actual problem you are experiencing with it? Isn’t it just a library like any other?

Neil

> On 9 Jul 2017, at 18:18, Chuck Davis <cj...@gmail.com> wrote:
> 
> Thanks Bram.  I actually read that yesterday but unfortunately it's Eclipse
> related and that ties me to Equinox.  So far I haven't found anything to
> like about Eclipse and I want true OSGi compatibility -- not tied to a
> specific IDE or OSGi implementation.  At least the Eclipse people are
> wrestling with the issue and that is a good sign.  I've done some of the
> e(fx)clipse tutorials as well but, again, it makes me dependent on specific
> implementations.
> 
> I'm going to re-read the article and see if I've missed something
> though.....
> 
> Again, thanks for your interest.
> 
> 
> On Sun, Jul 9, 2017 at 10:10 AM, Bram Pouwelse <br...@pouwelse.com> wrote:
> 
>> Hi Chuck,
>> 
>> It's an old post but could be what you're looking for
>> 
>> http://paulonjava.blogspot.nl/2014/11/making-javafx-better-
>> with-osgi.html?m=1
>> 
>> Regards,
>> Bram
>> 
>> Op 9 jul. 2017 19:05 schreef "Chuck Davis" <cj...@gmail.com>:
>> 
>>> Thanks Thomas.  I guess there must be a way.  I wish he would have just
>>> explained how to use JavaFX with Felix rather than develop a whole third
>>> party development environment.....
>>> 
>>> On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <
>>> thomas.driessen@ds-lab.org>
>>> wrote:
>>> 
>>>> Hi Chuck,
>>>> 
>>>> maybe this Project is an interesting starting Point for you:
>>>> http://www.drombler.org
>>>> 
>>>> Kind regards,
>>>> Thomas
>>>> 
>>>> Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
>>>> 
>>>>> 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: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
Thanks Bram.  I actually read that yesterday but unfortunately it's Eclipse
related and that ties me to Equinox.  So far I haven't found anything to
like about Eclipse and I want true OSGi compatibility -- not tied to a
specific IDE or OSGi implementation.  At least the Eclipse people are
wrestling with the issue and that is a good sign.  I've done some of the
e(fx)clipse tutorials as well but, again, it makes me dependent on specific
implementations.

I'm going to re-read the article and see if I've missed something
though.....

Again, thanks for your interest.


On Sun, Jul 9, 2017 at 10:10 AM, Bram Pouwelse <br...@pouwelse.com> wrote:

> Hi Chuck,
>
> It's an old post but could be what you're looking for
>
> http://paulonjava.blogspot.nl/2014/11/making-javafx-better-
> with-osgi.html?m=1
>
> Regards,
> Bram
>
> Op 9 jul. 2017 19:05 schreef "Chuck Davis" <cj...@gmail.com>:
>
> > Thanks Thomas.  I guess there must be a way.  I wish he would have just
> > explained how to use JavaFX with Felix rather than develop a whole third
> > party development environment.....
> >
> > On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <
> > thomas.driessen@ds-lab.org>
> > wrote:
> >
> > > Hi Chuck,
> > >
> > > maybe this Project is an interesting starting Point for you:
> > > http://www.drombler.org
> > >
> > > Kind regards,
> > > Thomas
> > >
> > > Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
> > >
> > > > 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.
> > > >
> > >
> >
>

Re: Felix and JavaFX

Posted by Bram Pouwelse <br...@pouwelse.com>.
Hi Chuck,

It's an old post but could be what you're looking for

http://paulonjava.blogspot.nl/2014/11/making-javafx-better-with-osgi.html?m=1

Regards,
Bram

Op 9 jul. 2017 19:05 schreef "Chuck Davis" <cj...@gmail.com>:

> Thanks Thomas.  I guess there must be a way.  I wish he would have just
> explained how to use JavaFX with Felix rather than develop a whole third
> party development environment.....
>
> On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <
> thomas.driessen@ds-lab.org>
> wrote:
>
> > Hi Chuck,
> >
> > maybe this Project is an interesting starting Point for you:
> > http://www.drombler.org
> >
> > Kind regards,
> > Thomas
> >
> > Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
> >
> > > 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.
> > >
> >
>

Re: Felix and JavaFX

Posted by Chuck Davis <cj...@gmail.com>.
Thanks Thomas.  I guess there must be a way.  I wish he would have just
explained how to use JavaFX with Felix rather than develop a whole third
party development environment.....

On Sun, Jul 9, 2017 at 9:19 AM, Thomas Driessen <th...@ds-lab.org>
wrote:

> Hi Chuck,
>
> maybe this Project is an interesting starting Point for you:
> http://www.drombler.org
>
> Kind regards,
> Thomas
>
> Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:
>
> > 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.
> >
>

Re: Felix and JavaFX

Posted by Thomas Driessen <th...@ds-lab.org>.
Hi Chuck,

maybe this Project is an interesting starting Point for you:
http://www.drombler.org

Kind regards,
Thomas

Am 09.07.2017 18:17 schrieb "Chuck Davis" <cj...@gmail.com>:

> 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.
>