|Re: e(fx)clipse runtime works on JRE8 but not JRE7 [message #1714957 is a reply to message #1714944]
||Tue, 17 November 2015 22:29
| Thomas Schindl
Registered: July 2009
a) do you require FXCanvas?
b) -Dorg.osgi.framework.bundle.parent=ext has no effect on Java7
because JavaFX is not on a classpath at all
c) if you run on Equinox 3.10 the 1.1.0 hooks can not work as the API
has changed so you need the 2.2.0 adapter hooks
d) if you run with the 2.2.0 adapter hooks you
- should remove org.eclipse.fx.javafx from your target it is not
- you have to remove package imports/require bundles to javafx.* and
org.eclipse.fx.javafx as well
e) it is an absolute must that the adapter-hook and osgi.jar at
physically next to each other
f) you can debug the adapter hook with -Defxclipse.osgi.hook.debug=true
On 17.11.15 22:37, Chris Hogan wrote:
> We have an OSGi system that's an in-house UI framework and we are trying
> to start incorporating FX UIs using e(fx)clipse runtime jars. To get
> this to work we cobbled together alot of forum postings to come up with
> the following procedure
> We have added the following jars (from our eclipse plugins directory) to
> the target platform:
> Then we upgraded to org.eclipse.osgi_3.10.100.v20150529-1857.jar to
> resolve a complaint that we are missing Require-Capability: osgi.ee;
> filter="(&(osgi.ee=JavaSE)(version=1.8 ))
> We added -Dosgi.framework.extensions=org.eclipse.fx.osgi and
> Any bundles that use FX code now have a dependency on the
> org.eclipse.fx.javafx plugin.
> This setup was working fine in both dev and release environment (more on
> that in a second) under JRE8. Then we found out we had to go back to
> using JRE7, now it runs in our dev environment through eclipse, but when
> we try to run in release environment it fails with NoClassDefFoundErrors
> on all of the JavaFX dependencies from our bundles.
> Our release environment is a bat file that runs the org.eclipse.osgi jar
> with a pointer to our config.ini file, and some command line switches
> for the framework hooks as described above. The config.ini contains the
> bundles we are launching, including the org.eclipse.fx.javafx.
> When we examine things on the console it shows that OSGi integration for
> JavaFX is RESOLVED, and all of our bundles are marked as ACTIVE
> including the "Fake bundle for Javafx" and all of our bundles that
> depend on it (i.e. have Require-Bundle set to include
> org.eclipse.fx.javafx). But as soon as we hit the point in the code
> where it needs JavaFX classes we get the NoClassDefFoundErrors.
> I'm wondering if maybe it's the version of the e(fx)clipse runtime I'm
> using that just doesn't support JRE7? Or is there some part of the
> configuration I'm missing? I don't understand why the e(fx)clipse
> runtime bundles seem to load fine but the dependency isn't found, Not to
> mention why it seems to work running in eclipse, and under JRE8 but not
> outside eclipse in JRE7.
> I'd really appreciate some help here. Thanks!
|Re: e(fx)clipse runtime works on JRE8 but not JRE7 [message #1715064 is a reply to message #1714957]
||Wed, 18 November 2015 22:44
| Chris Hogan
Registered: November 2015
Thanks so much for your reply, and I apologize in advance for any stupid questions I may ask, as I haven't been working in OSGi very long.
a) No FXCanvas, I'm not using any SWT stuff, just swing, so my integration is through JFXPanels
b) Very good to know, thank you! So there should be no value set for the org.osgi.framework.bundle.parent option, I'll remove those.
c) Where can I get the 2.2.0 adapter hook? The releases are only up to 2.1.0 from what I can see and I'm not sure how to build the main git project to produce a plugin. Where can I get a 2.2.0 target platform?
More to the point, I don't have anything forcing me to keep using 3.10 (I think we went forward to that one because we were originally using JDK8 and that's what Mars was using, which had better JDK8 integration or something), so if I were to go back to Luna or some other version of eclipse, is there a list somewhere of which adapter hook versions are compatible with which versions of org.eclipse.osgi?
d) Does this only apply for 2.2.0+ or would this apply to the 2.1.0 adapter hook?
e) I've definitely been doing this.
f) I have seen that in a few different threads around the web but I have yet to get it to work....what should I be looking for in the output to indicate that switch is working? And is there anything required to get it to work other than just adding it to the command line?
Finally, one question for you. I came across a stackoverflow (not allowed to link to it yet, but the title is "e(fx)clipse 0.9.0 on Kepler with Java 7") where you said what I interpreted to mean that newer versions (i.e. 0.9.0+) required Java8. That's why at one point I started trying to find a combination that would work with 0.9.0...did I misinterpret that? I should be able to get any version of the efxclipse runtime to work with JRE7 right?
[Updated on: Thu, 19 November 2015 01:33]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.01743 seconds