Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » JavaFX in Eclipse plugin hang on Fedora25
JavaFX in Eclipse plugin hang on Fedora25 [message #1751549] Wed, 11 January 2017 11:07 Go to next message
Joshua England is currently offline Joshua EnglandFriend
Messages: 2
Registered: January 2017
Junior Member
I am having problems following "Tutorial 2" and creating an Eclipse plugin which includes JavaFx. The program seems to hang when opening the view when opening "libglass".

Has anyone else seen this problem?

I've read some articles saying that JavaFX isn't really suitable for OSGi bundling. What does the efxclipse project provide to get it working?

Has anyone got "Tutorial 2" to work on other Linux distributions or with different JDKs? I am using Oracle JDK instead of OpenJDK because JavaFX is not included in the distribution of OpenJDK in Fedora25.

Many thanks

==== Details ====
- Fedora 25 4.8.15-300.fc25.x86_64
- Eclipse Neon.2
- javac 1.8.0_112 (Oracle)

==== Stack trace ===
ClassLoader$NativeLibrary.load(String, boolean) line: not available [native method]
ClassLoader.loadLibrary0(Class<?>, File) line: 1941
ClassLoader.loadLibrary(Class<?>, String, boolean) line: 1824
Runtime.load0(Class<?>, String) line: 809
System.load(String) line: 1086
NativeLibLoader.loadLibraryFullPath(String) line: 201
NativeLibLoader.loadLibraryInternal(String) line: 94
NativeLibLoader.loadLibrary(String) line: 39
Application.loadNativeLibrary(String) line: 112
Application.loadNativeLibrary() line: 120
GtkApplication.lambda$static$44() line: 52
2087306626.run() line: not available
AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]
GtkApplication.<clinit>() line: 51
GtkPlatformFactory.createApplication() line: 41
Application.run(Runnable) line: 146
QuantumToolkit.startup(Runnable) line: 257
PlatformImpl.startup(Runnable) line: 211
FXCanvas.initFx() line: 295
Re: JavaFX in Eclipse plugin hang on Fedora25 [message #1751708 is a reply to message #1751549] Thu, 12 January 2017 18:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6313
Registered: July 2009
Senior Member
On the Libary problem: Can you run a plain JavaFX application (without OSGi, ...) as described in Tutorial 1 - As I'm not on Linux I can't say if this is a general problem or not

On JavaFX and OSGi: Historically there've been problems when running JavaFX in an OSGi-Environment but together with Oracle we managed to address most of them. The really tricky thing is to get the JavaFX-SWT-Brigde running inside Equinox because FXCanvas is shipped with the JDK but on no classpath (for obvious reasons it depends on SWT!). To get that working we install an Equinox-AdapterHook who create a dynamic Classloader who can lookup all necessary bits.

I could ask one of my co-workers tomorrow (not sure what linux-distro they are running) to see if it fails for them as well.
Re: JavaFX in Eclipse plugin hang on Fedora25 [message #1751729 is a reply to message #1751708] Fri, 13 January 2017 08:13 Go to previous message
Joshua England is currently offline Joshua EnglandFriend
Messages: 2
Registered: January 2017
Junior Member
Yes I was able to run JavaFX as in Tutorial 1

In the end my solution was:

* Install Oracle JDK as OpenJDK package on Fedora did not include JavaFX
* Install efxclipse
* Setup the project and target platform as described in tutorial 2
* Set the SWT_GTK=0 environment variable
* Run

From reading various bug reports about libglass it turns out it has difficulty establishing the version of GTK being used and hangs. Setting that environment variable makes the problem magically go away.
Previous Topic:Is it possible to drag a window/view out of workbench if the application is written in JavaFX?
Next Topic:Compile fxgraph to fxml with Maven
Goto Forum:
  


Current Time: Thu May 25 05:10:22 GMT 2017

Powered by FUDForum. Page generated in 0.01800 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software