Home » Eclipse Projects » e(fx)clipse » Works with Java 7, but not Java 8
Works with Java 7, but not Java 8 [message #1464270] |
Fri, 07 November 2014 06:16  |
Eclipse User |
|
|
|
Howdy,
I have a strange situation: I have an Eclipse application that is built on Luna, although it contains a number of RCP3 components. I need only one JavaFX element, the HTML Editor, specifically javafx.scene.web.HTMLEditor.
And this works fine with Java 7. But if I use Java 8, it does not: And there is no error message, nothing. The application just hangs.
Worse, I cannot even troubleshoot it, because it works fine in the IDE. The problem only appears in the Maven built (via Tycho).
I first want to verify that I include the correct feature. I am currently using this update site:
http://download.eclipse.org/efxclipse/runtime-released/1.0.0/site
And I include org.eclipse.fx.runtime.feature
Any thought...? Do I need anything that Tycho may not be aware of, that I need to add as an explicit dependency?
Thanks!
- Michael
|
|
|
Re: Works with Java 7, but not Java 8 [message #1464309 is a reply to message #1464270] |
Fri, 07 November 2014 07:05   |
Eclipse User |
|
|
|
Ok - so you are embedding JavaFX into SWT using FXCanvas? The first
thing to look at to turn on the logging for the OSGi-Adapter-Hooks by
starting with "-Defxclipse.osgi.hook.debug=true" (e.g. modify your
eclipse.ini).
The 2nd thing I'd try is to get a thread dump, e.g. by connecting a
debugger to the external launched application or getting through other
means [1].
Tom
[1]https://wiki.eclipse.org/How_to_report_a_deadlock
On 07.11.14 12:16, Michael Jastram wrote:
> Howdy,
>
> I have a strange situation: I have an Eclipse application that is built
> on Luna, although it contains a number of RCP3 components. I need only
> one JavaFX element, the HTML Editor, specifically
> javafx.scene.web.HTMLEditor.
> And this works fine with Java 7. But if I use Java 8, it does not: And
> there is no error message, nothing. The application just hangs.
>
> Worse, I cannot even troubleshoot it, because it works fine in the IDE.
> The problem only appears in the Maven built (via Tycho).
>
> I first want to verify that I include the correct feature. I am
> currently using this update site:
>
> http://download.eclipse.org/efxclipse/runtime-released/1.0.0/site
>
> And I include org.eclipse.fx.runtime.feature
>
> Any thought...? Do I need anything that Tycho may not be aware of, that
> I need to add as an explicit dependency?
>
> Thanks!
>
> - Michael
|
|
| | |
Re: Works with Java 7, but not Java 8 [message #1466887 is a reply to message #1464373] |
Sun, 09 November 2014 11:09   |
Eclipse User |
|
|
|
Hi Tom,
Thanks for the help, but I am still banging my head against the wall.
> so you need to make sure that:
> a) the org.eclipse.fx.osgi fragment is loaded
I explicitly added it as a plug-in to be packaged in my feature. At runtime, it is listed via About | Installation Details. Also, org.eclipse.osgi.compatibility.state is loaded as well.
> b) your config.ini has the necessary entry similar to
> osgi.framework.extensions=reference\:file\:org.eclipse.osgi.compatibility.state_1.0.0.v20140403-1907.jar,reference\:file\:org.eclipse.fx.osgi_1.1.0.201411050602.jar
I played around with this, but the syntax does not seem to work (of course I fixed the version numbers). Two thoughts:
(1) In the tutorial, you use this syntax:
-Dosgi.framework.extensions=org.eclipse.fx.osgi
And this worked for me in the past (both with 0.9.0 and the nightly build). I extended this with org.eclipse.osgi.compatibility.state, but this did not help.
(2) I just upgraded to 1.1.0, but I could not get it to work, either. Just for the record, this worked fine while I was using this update site:
<unit id="org.eclipse.fx.runtime.min.feature.feature.group" version="1.0.0.201409241226"/>
<repository location="http://download.eclipse.org/efxclipse/runtime-shared-nightly/site/"/>
But of course, I had to change the target platform before every maven built, as this update site changed, well, nightly. I used this before the 1.0 release, but I would prefer a stable built. And that one did not work with Java 8, just Java 7.
Any thoughts? Thanks!
- Michael
|
|
| |
Re: Works with Java 7, but not Java 8 [message #1467112 is a reply to message #1467102] |
Sun, 09 November 2014 15:36   |
Eclipse User |
|
|
|
Hi Tom,
Okay, never mind, problem solved. setting SWT_GTK3=0 did the trick.
In case you're interested: I used that for launching Eclipse (that's why it worked out of the dev environment), and I also had a shortcut using it, making me think that it worked in the past. But I had forgotten about it, costing me hours of debugging. My bad. 
Anyway, thanks again for your quick responses, and I'll leave you alone (at least for now). 
Best,
- Michael
|
|
|
Re: Works with Java 7, but not Java 8 [message #1467691 is a reply to message #1467112] |
Mon, 10 November 2014 03:19   |
Eclipse User |
|
|
|
It would be better to use launcher switch "--launcher.GTK_version 2"
because without that your users have to set the env-var themselves.
Tom
On 09.11.14 21:36, Michael Jastram wrote:
> Hi Tom,
>
> Okay, never mind, problem solved. setting SWT_GTK3=0 did the trick.
>
> In case you're interested: I used that for launching Eclipse (that's why
> it worked out of the dev environment), and I also had a shortcut using
> it, making me think that it worked in the past. But I had forgotten
> about it, costing me hours of debugging. My bad. :(
>
> Anyway, thanks again for your quick responses, and I'll leave you alone
> (at least for now). :)
>
> Best,
>
> - Michael
|
|
|
Re: Works with Java 7, but not Java 8 [message #1467712 is a reply to message #1467691] |
Mon, 10 November 2014 03:40  |
Eclipse User |
|
|
|
Hi Tom,
> It would be better to use launcher switch "--launcher.GTK_version 2"
OMG - this is what I had been looking for all along. Works great! When I researched this way back then, I only encountered the environment variable as a solution. At that time Luna was not out yet. So I wonder whether this was not yet available in Kepler.
Either way, thanks so much.
Best,
- Michael
|
|
|
Goto Forum:
Current Time: Thu Mar 13 13:55:34 EDT 2025
Powered by FUDForum. Page generated in 0.23990 seconds
|