Discussion:
Running JavaFX-11 applications from within Eclipse fails
Tom Schindl
2018-10-18 10:38:39 UTC
Permalink
Hi,

I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread" java.lang.NoSuchMethodError: <init>
at javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native Method)
at javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
at javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
at javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.

The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.

Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?

Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Nir Lisker
2018-10-21 09:35:19 UTC
Permalink
Hi Tom,

Iv'e never gotten this error. How do you reproduce this?

- Nir
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Tom Schindl
2018-10-21 17:38:34 UTC
Permalink
Well:
- Launch Eclipse 2018-09 with Orcale-Java-8
- Create a maven-enabled project (I think this is important because if
you launch with the FX-SDK on the command line you won't run into
this)
- Boom

Tom
Post by Nir Lisker
Hi Tom,
Iv'e never gotten this error. How do you reproduce this?
- Nir
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Method)
     at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
     at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
     at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
     at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
     at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
     at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Nir Lisker
2018-10-21 19:15:23 UTC
Permalink
Ah, I didn't realize you were talking about Java 8.
Post by Tom Schindl
- Launch Eclipse 2018-09 with Orcale-Java-8
- Create a maven-enabled project (I think this is important because if
you launch with the FX-SDK on the command line you won't run into
this)
- Boom
Tom
Post by Nir Lisker
Hi Tom,
Iv'e never gotten this error. How do you reproduce this?
- Nir
Hi,
I just wanted to make you aware that if you run a JavaFX-11
application
Post by Nir Lisker
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by Nir Lisker
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by Nir Lisker
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Nir Lisker
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by Nir Lisker
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by Nir Lisker
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by Nir Lisker
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by Nir Lisker
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by Nir Lisker
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Nir Lisker
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong
glass.dll
Post by Nir Lisker
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version
our
Post by Nir Lisker
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Tom Schindl
2018-10-21 22:03:07 UTC
Permalink
Hi,

Well we talk about JavaFX-11 but the important thing is that this bug
only happens if your Eclipse IDE is running Oracle-Java-8 ;-)

Tom
Post by Nir Lisker
Ah, I didn't realize you were talking about Java 8.
On Sun, Oct 21, 2018 at 10:09 PM Tom Schindl
- Launch Eclipse 2018-09 with Orcale-Java-8
- Create a maven-enabled project (I think this is important because if
  you launch with the FX-SDK on the command line you won't run into
  this)
- Boom
Tom
Post by Nir Lisker
Hi Tom,
Iv'e never gotten this error. How do you reproduce this?
- Nir
On Thu, Oct 18, 2018 at 1:39 PM Tom Schindl
     Hi,
     I just wanted to make you aware that if you run a JavaFX-11
application
Post by Nir Lisker
     from within Eclipse it is very likely that you'll get an error
like
Post by Nir Lisker
     this.
     > Exception in thread "WindowsNativeRunloopThread"
     java.lang.NoSuchMethodError: <init>
     >     at
   
 javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by Nir Lisker
     Method)
     >     at
   
 javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Post by Nir Lisker
     Method)
     >     at
   
 javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Nir Lisker
     >     at java.base/java.lang.Thread.run(Thread.java:834)
     > Exception in thread "JavaFX Application Thread"
     java.lang.NullPointerException
     >     at
   
 javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by Nir Lisker
     >     at
   
 javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Post by Nir Lisker
     Method)
     >     at
   
 javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Nir Lisker
     >     at java.base/java.lang.Thread.run(Thread.java:834)
     Scary right! The reason is that JavaFX-11 is loading the wrong
glass.dll
Post by Nir Lisker
     because Eclipse sets a java.library.path who also contains the
     JVM-Directories used to launch your Eclipse IDE.
     The simple work-around is to add
     -Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
     configuration.
     Small tiny question on the side: Wouldn't it make sense to
version our
Post by Nir Lisker
     .dlls somehow to match the release eg glass-11.dll?
     Tom
     --
     Tom Schindl, CTO
     BestSolution.at EDV Systemhaus GmbH
     Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
     Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Johan Vos
2018-10-21 17:45:58 UTC
Permalink
Hi Tom,

Nice workaround, but what do you think needs to be done to fix it? Can the
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but that
seems the wrong solution to me.

- Johan
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Tom Schindl
2018-10-21 17:55:53 UTC
Permalink
Well fixing the bug in Eclipse is the right way to address this ;-) Once
I have time I'll provide a patch.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=540247

Tom
Post by Nir Lisker
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can
the java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but
that seems the wrong solution to me.
- Johan
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Method)
     at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
     at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
     at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
     at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
     at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
     at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Johan Vos
2018-10-21 18:35:06 UTC
Permalink
Thanks, that was what I was hoping for but didn't dare to ask :)

- Johan
Post by Tom Schindl
Well fixing the bug in Eclipse is the right way to address this ;-) Once
I have time I'll provide a patch.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=540247
Tom
Post by Nir Lisker
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can
the java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but
that seems the wrong solution to me.
- Johan
Hi,
I just wanted to make you aware that if you run a JavaFX-11
application
Post by Nir Lisker
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by Nir Lisker
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by Nir Lisker
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Nir Lisker
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by Nir Lisker
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by Nir Lisker
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by Nir Lisker
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by Nir Lisker
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by Nir Lisker
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Nir Lisker
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong
glass.dll
Post by Nir Lisker
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version
our <https://maps.google.com/?q=sense+to+version+our&entry=gmail&source=g>
Post by Nir Lisker
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Kevin Rushforth
2018-10-22 12:12:26 UTC
Permalink
Post by Johan Vos
Renaming the native libraries in JavaFX would probably solve this, but that
seems the wrong solution to me.
Yes, it seems like a workaround rather than a fix...

-- Kevin
Post by Johan Vos
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can the
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but that
seems the wrong solution to me.
- Johan
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like this.
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
José Pereda
2018-11-04 15:17:56 UTC
Permalink
I've just noticed that this issue happens not only with Maven but also with
Gradle projects (Gradle + Eclipse 2018-09 + Windows with Oracle JDK 1.8),
running gradle tasks from Eclipse.

The same proposed workaround can be applied to the build file:

run {

systemProperty "java.library.path", "C:\tmp"

}
Post by Kevin Rushforth
Post by Johan Vos
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
Yes, it seems like a workaround rather than a fix...
-- Kevin
Post by Johan Vos
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can
the
Post by Johan Vos
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
- Johan
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like
this.
Post by Johan Vos
Post by Tom Schindl
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by Johan Vos
Post by Tom Schindl
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl
2018-11-04 16:38:53 UTC
Permalink
I think the more general problem is that they don‘t run on the module-path - in the m2e case this because the modules are transitive deps and those are not supported properly

Tom

Von meinem iPhone gesendet
Post by José Pereda
I've just noticed that this issue happens not only with Maven but also with
Gradle projects (Gradle + Eclipse 2018-09 + Windows with Oracle JDK 1.8),
running gradle tasks from Eclipse.
run {
systemProperty "java.library.path", "C:\tmp"
}
Post by Kevin Rushforth
Post by Johan Vos
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
Yes, it seems like a workaround rather than a fix...
-- Kevin
Post by Johan Vos
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can
the
Post by Johan Vos
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
- Johan
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11 application
from within Eclipse it is very likely that you'll get an error like
this.
Post by Johan Vos
Post by Tom Schindl
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by Johan Vos
Post by Tom Schindl
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong glass.dll
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Nir Lisker
2018-11-07 16:21:53 UTC
Permalink
I have a related problem when developing JavaFX in Eclipse and Win10 that
started in 11.

I created a modular project and in its build configuration (in Eclipse) I
added the JavaFX base and graphics projects (that point to rt\modules\...)
and OpenJDK11 to the module path.
In the module-info file I required the JavaFX modules and exported my
package.

Compilation is fine, but during runtime (with -Dprism.verbose=true) I get
an error:

Prism pipeline init order: d3d sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
// Error here: //
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [see
below]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.lambda$0(D3DPipeline.java:48)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.<clinit>(D3DPipeline.java:44)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [see
below]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
// ...

The paths listed at the end are those from %PATH% and none point to the
development modules. So, I added to the runtime VM args in the launch
configuration:

-Djava.library.path="...\rt\modules\javafx.graphics\bin"
and I also tried with
"...\rt\modules\javafx.graphics\bin\com\sun\prism\d3d" because this is
where com.sun.prism.d3d.D3DPipeline is.

I get the same error. Did anyone encounter this?

- Nir
Post by Tom Schindl
I think the more general problem is that they don‘t run on the module-path
- in the m2e case this because the modules are transitive deps and those
are not supported properly
Tom
Von meinem iPhone gesendet
Post by José Pereda
I've just noticed that this issue happens not only with Maven but also
with
Post by José Pereda
Gradle projects (Gradle + Eclipse 2018-09 + Windows with Oracle JDK 1.8),
running gradle tasks from Eclipse.
run {
systemProperty "java.library.path", "C:\tmp"
}
On Mon, Oct 22, 2018 at 4:43 PM Kevin Rushforth <
Post by Kevin Rushforth
Post by Johan Vos
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
Yes, it seems like a workaround rather than a fix...
-- Kevin
Post by Johan Vos
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can
the
Post by Johan Vos
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
- Johan
On Thu, Oct 18, 2018 at 3:39 PM Tom Schindl <
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11
application
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
from within Eclipse it is very likely that you'll get an error like
this.
Post by Johan Vos
Post by Tom Schindl
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong
glass.dll
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version our
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Nir Lisker
2018-11-12 10:41:10 UTC
Permalink
I managed to solve my problem. It's actually looking for the dlls, so using

-Djava.library.path="...\rt\modules\javafx.graphics\build\module-lib"

will start the application properly. If anyone can confirm this problem and
solution I'll add this step to the wiki.
Post by Nir Lisker
I have a related problem when developing JavaFX in Eclipse and Win10 that
started in 11.
I created a modular project and in its build configuration (in Eclipse) I
added the JavaFX base and graphics projects (that point to rt\modules\...)
and OpenJDK11 to the module path.
In the module-info file I required the JavaFX modules and exported my
package.
Compilation is fine, but during runtime (with -Dprism.verbose=true) I get
Prism pipeline init order: d3d sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
// Error here: //
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [see
below]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.lambda$0(D3DPipeline.java:48)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.<clinit>(D3DPipeline.java:44)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [see
below]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
// ...
The paths listed at the end are those from %PATH% and none point to the
development modules. So, I added to the runtime VM args in the launch
-Djava.library.path="...\rt\modules\javafx.graphics\bin"
and I also tried with
"...\rt\modules\javafx.graphics\bin\com\sun\prism\d3d" because this is
where com.sun.prism.d3d.D3DPipeline is.
I get the same error. Did anyone encounter this?
- Nir
Post by Tom Schindl
I think the more general problem is that they don‘t run on the
module-path - in the m2e case this because the modules are transitive deps
and those are not supported properly
Tom
Von meinem iPhone gesendet
Post by José Pereda
I've just noticed that this issue happens not only with Maven but also
with
Post by José Pereda
Gradle projects (Gradle + Eclipse 2018-09 + Windows with Oracle JDK
1.8),
Post by José Pereda
running gradle tasks from Eclipse.
run {
systemProperty "java.library.path", "C:\tmp"
}
On Mon, Oct 22, 2018 at 4:43 PM Kevin Rushforth <
Post by Kevin Rushforth
Post by Johan Vos
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
Yes, it seems like a workaround rather than a fix...
-- Kevin
Post by Johan Vos
Hi Tom,
Nice workaround, but what do you think needs to be done to fix it? Can
the
Post by Johan Vos
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve this, but
that
Post by Johan Vos
seems the wrong solution to me.
- Johan
On Thu, Oct 18, 2018 at 3:39 PM Tom Schindl <
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11
application
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
from within Eclipse it is very likely that you'll get an error like
this.
Post by Johan Vos
Post by Tom Schindl
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
Method)
at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Method)
Post by Johan Vos
Post by Tom Schindl
at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the wrong
glass.dll
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to version
our
Post by José Pereda
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
Tom Schindl
2018-11-12 12:32:30 UTC
Permalink
Hi,

I never used the relative version but can confirm that you have to set
the library path to the built DLLs

Tom
Post by Nir Lisker
I managed to solve my problem. It's actually looking for the dlls, so using
-Djava.library.path="...\rt\modules\javafx.graphics\build\module-lib"
will start the application properly. If anyone can confirm this problem
and solution I'll add this step to the wiki.
I have a related problem when developing JavaFX in Eclipse and Win10
that started in 11.
I created a modular project and in its build configuration (in
Eclipse) I added the JavaFX base and graphics projects (that point
to rt\modules\...) and OpenJDK11 to the module path.
In the module-info file I required the JavaFX modules and exported
my package.
Compilation is fine, but during runtime (with -Dprism.verbose=true)
Prism pipeline init order: d3d sw 
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
// Error here: //
GraphicsPipeline.createPipeline failed for com.sun.prism.d3d.D3DPipeline
[see below]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.lambda$0(D3DPipeline.java:48)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.<clinit>(D3DPipeline.java:44)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
[see below]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at
javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at
javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at
javafx.graphics/com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at
javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for :  d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
// ...
The paths listed at the end are those from %PATH% and none point to
the development modules. So, I added to the runtime VM args in the
-Djava.library.path="...\rt\modules\javafx.graphics\bin"
and I also tried with
"...\rt\modules\javafx.graphics\bin\com\sun\prism\d3d" because this
is where com.sun.prism.d3d.D3DPipeline is.
I get the same error. Did anyone encounter this?
- Nir
On Sun, Nov 4, 2018 at 6:40 PM Tom Schindl
I think the more general problem is that they don‘t run on the
module-path - in the m2e case this because the modules are
transitive deps and those are not supported properly
Tom
Von meinem iPhone gesendet
Am 04.11.2018 um 16:17 schrieb José Pereda
I've just noticed that this issue happens not only with Maven
but also with
Gradle projects (Gradle + Eclipse 2018-09 + Windows with
Oracle JDK 1.8),
running gradle tasks from Eclipse.
run {
    systemProperty "java.library.path", "C:\tmp"
}
On Mon, Oct 22, 2018 at 4:43 PM Kevin Rushforth
Post by Kevin Rushforth
Post by Johan Vos
Renaming the native libraries in JavaFX would probably solve
this, but
Post by Kevin Rushforth
that
Post by Johan Vos
seems the wrong solution to me.
Yes, it seems like a workaround rather than a fix...
-- Kevin
Post by Johan Vos
Hi Tom,
Nice workaround, but what do you think needs to be done to
fix it? Can
Post by Kevin Rushforth
the
Post by Johan Vos
java.library.path somehow be changed in a plugin or so?
Renaming the native libraries in JavaFX would probably solve
this, but
Post by Kevin Rushforth
that
Post by Johan Vos
seems the wrong solution to me.
- Johan
On Thu, Oct 18, 2018 at 3:39 PM Tom Schindl
Post by Tom Schindl
Hi,
I just wanted to make you aware that if you run a JavaFX-11
application
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
from within Eclipse it is very likely that you'll get an
error like
Post by Kevin Rushforth
this.
Post by Johan Vos
Post by Tom Schindl
Exception in thread "WindowsNativeRunloopThread"
java.lang.NoSuchMethodError: <init>
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.staticScreen_getScreens(Native
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
Method)
     at
javafx.graphics/com.sun.glass.ui.Screen.initScreens(Screen.java:412)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:152)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Post by Kevin Rushforth
Method)
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "JavaFX Application Thread"
java.lang.NullPointerException
     at
javafx.graphics/com.sun.prism.d3d.D3DPipeline.getAdapterOrdinal(D3DPipeline.java:205)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.assignScreensAdapters(QuantumToolkit.java:695)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.runToolkit(QuantumToolkit.java:313)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$startup$10(QuantumToolkit.java:258)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.glass.ui.Application.lambda$run$1(Application.java:153)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native
Post by Kevin Rushforth
Method)
Post by Johan Vos
Post by Tom Schindl
     at
javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
     at java.base/java.lang.Thread.run(Thread.java:834)
Scary right! The reason is that JavaFX-11 is loading the
wrong glass.dll
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
because Eclipse sets a java.library.path who also contains the
JVM-Directories used to launch your Eclipse IDE.
The simple work-around is to add
-Djava.library.path=C:/go-out-of-my-way-eclipse in your launch
configuration.
Small tiny question on the side: Wouldn't it make sense to
version our
Post by Kevin Rushforth
Post by Johan Vos
Post by Tom Schindl
.dlls somehow to match the release eg glass-11.dll?
Tom
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
--
--
Tom Schindl, CTO
BestSolution.at EDV Systemhaus GmbH
Eduard-Bodem-Gasse 5-7. A-6020 Innsbruck
Reg. Nr. FN 222302s am Firmenbuchgericht Innsbruck
Loading...