6 Replies Latest reply: May 29, 2012 3:27 PM by 866711 RSS

    Javafx 2 plugin for RCP

    932034
      I develop an eclipse RCP application and want to use Javafx 2.

      So, i have created a javafx 2 plugin with the wizard New > Project > Plug in development > Plug in from existing jar archives.

      My RCP application has a dependency to that plug-in. It compiles and works well when i launch my application from eclipse.

      But when i try to deploy it, i obtain a java.lang.NoClassDefFoundError: javafx/scene/chart/Axis caused by java.lang.ClassNotFoundException: javafx.scene.chart.Axis

      What's wrong?

      My javafx 2 manifest.MF:

      Manifest-Version: 1.0
      Bundle-ManifestVersion: 2
      Bundle-Name: Javafx2
      Bundle-SymbolicName: com.thales.plugin.javafx2
      Bundle-Version: 2.0.0
      Bundle-ClassPath: jfxrt.jar
      Export-Package: com.sun.browser.plugin,
      com.sun.deploy.uitoolkit.impl.fx,
      com.sun.deploy.uitoolkit.impl.fx.ui,
      com.sun.deploy.uitoolkit.impl.fx.ui.resources,
      com.sun.glass.events,
      com.sun.glass.ui,
      com.sun.glass.ui.delegate,
      com.sun.glass.ui.mac,
      com.sun.glass.ui.win,
      com.sun.glass.ui.x11,
      com.sun.glass.utils,
      com.sun.javafx,
      com.sun.javafx.animation,
      com.sun.javafx.animation.transition,
      com.sun.javafx.applet,
      com.sun.javafx.application,
      com.sun.javafx.beans.annotations,
      com.sun.javafx.beans.event,
      com.sun.javafx.binding,
      com.sun.javafx.charts,
      com.sun.javafx.collections,
      com.sun.javafx.collections.annotations,
      com.sun.javafx.collections.transformation,
      com.sun.javafx.css,
      com.sun.javafx.css.converters,
      com.sun.javafx.css.parser,
      com.sun.javafx.cursor,
      com.sun.javafx.effect,
      com.sun.javafx.embed,
      com.sun.javafx.event,
      com.sun.javafx.font,
      com.sun.javafx.functions,
      com.sun.javafx.fxml,
      com.sun.javafx.fxml.builder,
      com.sun.javafx.fxml.expression,
      com.sun.javafx.geom,
      com.sun.javafx.geom.transform,
      com.sun.javafx.iio,
      com.sun.javafx.iio.bmp,
      com.sun.javafx.iio.common,
      com.sun.javafx.iio.gif,
      com.sun.javafx.iio.jpeg,
      com.sun.javafx.iio.png,
      com.sun.javafx.jmx,
      com.sun.javafx.logging,
      com.sun.javafx.perf,
      com.sun.javafx.property,
      com.sun.javafx.robot,
      com.sun.javafx.robot.impl,
      com.sun.javafx.runnable,
      com.sun.javafx.runtime,
      com.sun.javafx.runtime.async,
      com.sun.javafx.runtime.eula,
      com.sun.javafx.runtime.provider,
      com.sun.javafx.scene,
      com.sun.javafx.scene.control,
      com.sun.javafx.scene.control.behavior,
      com.sun.javafx.scene.control.skin,
      com.sun.javafx.scene.control.skin.resources,
      com.sun.javafx.scene.input,
      com.sun.javafx.scene.layout.region,
      com.sun.javafx.scene.paint,
      com.sun.javafx.scene.shape,
      com.sun.javafx.scene.text,
      com.sun.javafx.scene.traversal,
      com.sun.javafx.scene.web.behavior,
      com.sun.javafx.scene.web.skin,
      com.sun.javafx.sg,
      com.sun.javafx.sg.prism,
      com.sun.javafx.stage,
      com.sun.javafx.svgpath.ext.geom,
      com.sun.javafx.svgpath.i18n,
      com.sun.javafx.svgpath.parser,
      com.sun.javafx.svgpath.util,
      com.sun.javafx.svgpath.util.io,
      com.sun.javafx.tk,
      com.sun.javafx.tk.desktop,
      com.sun.javafx.tk.quantum,
      com.sun.javafx.util,
      com.sun.media.jfxmedia,
      com.sun.media.jfxmedia.control,
      com.sun.media.jfxmedia.effects,
      com.sun.media.jfxmedia.events,
      com.sun.media.jfxmedia.locator,
      com.sun.media.jfxmedia.logging,
      com.sun.media.jfxmedia.metadata,
      com.sun.media.jfxmedia.track,
      com.sun.media.jfxmediaimpl,
      com.sun.openpisces,
      com.sun.prism,
      com.sun.prism.camera,
      com.sun.prism.d3d,
      com.sun.prism.impl,
      com.sun.prism.impl.packrect,
      com.sun.prism.impl.paint,
      com.sun.prism.impl.ps,
      com.sun.prism.impl.shape,
      com.sun.prism.j2d,
      com.sun.prism.j2d.paint,
      com.sun.prism.nativewindow,
      com.sun.prism.nativewindow.impl,
      com.sun.prism.opengl,
      com.sun.prism.opengl.fixedfunc,
      com.sun.prism.opengl.glu,
      com.sun.prism.opengl.impl.glu,
      com.sun.prism.opengl.impl.glu.error,
      com.sun.prism.opengl.impl.glu.tessellator,
      com.sun.prism.paint,
      com.sun.prism.ps,
      com.sun.prism.render,
      com.sun.prism.shader,
      com.sun.prism.shape,
      com.sun.prism.tkal,
      com.sun.scenario,
      com.sun.scenario.animation,
      com.sun.scenario.animation.shared,
      com.sun.scenario.effect,
      com.sun.scenario.effect.impl,
      com.sun.scenario.effect.impl.hw,
      com.sun.scenario.effect.impl.hw.d3d,
      com.sun.scenario.effect.impl.prism,
      com.sun.scenario.effect.impl.prism.ps,
      com.sun.scenario.effect.impl.prism.sw,
      com.sun.scenario.effect.impl.state,
      com.sun.scenario.effect.impl.sw,
      com.sun.scenario.effect.impl.sw.java,
      com.sun.scenario.effect.impl.sw.sse,
      com.sun.scenario.effect.light,
      com.sun.t2k,
      com.sun.webpane.perf,
      com.sun.webpane.platform,
      com.sun.webpane.platform.event,
      com.sun.webpane.platform.graphics,
      com.sun.webpane.sg,
      com.sun.webpane.sg.prism,
      com.sun.webpane.sg.prism.theme,
      com.sun.webpane.sg.theme,
      com.sun.webpane.webkit,
      com.sun.webpane.webkit.dom,
      com.sun.webpane.webkit.network,
      com.sun.webpane.webkit.network.about,
      com.sun.webpane.webkit.network.data,
      com.sun.webpane.webkit.unicode,
      glass.mat,
      javafx.animation,
      javafx.application,
      javafx.beans,
      javafx.beans.binding,
      javafx.beans.property,
      javafx.beans.value,
      javafx.collections,
      javafx.concurrent,
      javafx.embed.swing,
      javafx.embed.swt,
      javafx.event,
      javafx.fxml,
      javafx.geometry,
      javafx.scene,
      javafx.scene.chart,
      javafx.scene.control,
      javafx.scene.control.cell,
      javafx.scene.effect,
      javafx.scene.image,
      javafx.scene.input,
      javafx.scene.layout,
      javafx.scene.media,
      javafx.scene.paint,
      javafx.scene.shape,
      javafx.scene.text,
      javafx.scene.transform,
      javafx.scene.web,
      javafx.stage,
      javafx.util,
      netscape.javascript
      Bundle-RequiredExecutionEnvironment: JavaSE-1.7
      Eclipse-BuddyPolicy: registered

      My javafx 2 build.properties :
      bin.includes = META-INF/,\
      jfxrt.jar,\
      WebPaneJava.dll,\
      decora-d3d.dll,\
      decora-sse.dll,\
      fxplugins.dll,\
      glib-lite.dll,\
      gstreamer-lite.dll,\
      javafx-font.dll,\
      javafx-iio.dll,\
      jfxmedia.dll,\
      libxml2.dll,\
      mat.dll,\
      msvcr100.dll,\
      prism-d3d.dll

      What is missing? How can i deploy javafx in my application so the user does not have to install javafx?

      Thanks
        • 1. Re: Javafx 2 plugin for RCP
          918979
          Hi,
          do you have exported all necessary packages in the "Runtime" tab of your plugin Manifest ? Be sure that all javafx plugins are correctly exported and it should work ;)
          Tell me if you've any problems

          Jonathan
          • 2. Re: Javafx 2 plugin for RCP
            932034
            Hi,

            I exported the following lib found in the JavaFX 2.0 SDK :
            jfxrt.jar, WebPaneJava.dll, decora-d3d.dll, decora-sse.dll, fxplugins.dll, glib-lite.dll, gstreamer-lite.dll, javafx-font.dll, javafx-iio.dll, jfxmedia.dll, libxml2.dll, mat.dll, msvcr100.dll, prism-d3d.dll

            In the runtime tab, i exported all packages found in the jfxrt.jar.

            Perhaps i should create a plugin with the lib provided by the JavaFX 2.0 Runtime?

            I will try and tell you then.

            Edited by: Razielwar on 27 avr. 2012 01:31
            • 3. Re: Javafx 2 plugin for RCP
              932034
              It does not work...

              I will try to install efxclipse to see if i can use their OSGI bundle to deploy my application
              • 4. Re: Javafx 2 plugin for RCP
                912736
                Does your RCP plugin that depends on the JavaFX plugin declare "Eclipse-RegisterBuddy: <your fx plugin>" in its manifest?
                • 5. Re: Javafx 2 plugin for RCP
                  932034
                  Yes, it does!

                  Finally, i solved my problems by doanloading a eclipse Indigo with the plugin efxclipse.

                  In the preferences > javafx i set the javafx SDK directory. Then, in my eclipse rcp, i put all javafx packages i needed in the "imported packages".

                  Finally, i added a dependency of my product to the plugins at.bestsolution.efxclipse.runtime.javafx and at.bestsolution.efxclipse.runtime.osgi found here

                  I don't know how to do that without efxclipse. I posted a message on their forum to know if there is another way easier than this one.

                  It seems their is some problems with classloading to fix and the plugin at.bestsolution.efxclipse.runtime.osgi care about that.

                  If someone has found another solution, i'm interested.

                  Edited by: Razielwar on 2 mai 2012 05:39
                  • 6. Re: Javafx 2 plugin for RCP
                    866711
                    There are 2 new wizards in e(fx)clipse 0.0.14 - who help you bootstraping an OSGi-Application. See http://tomsondev.bestsolution.at/2012/05/29/efxclipse-0-0-14-released/. You are right e(fx)clipse hooks the OSGi classloading to locate the javafxrt.jar. It allows you since 0.0.13 to repackage javafx binaries as an OSGi bundle so your users don't have to have JavaFX installed on their system. Feel free to ask questions at our forum at https://groups.google.com/forum/#!forum/efxclipse