In the meantime there was a communication with Azul's support (my e-mail got through and they kindly
answered without having an account) in which context (preparing and reporting cases) I could find a
locally created script being used that would explicitly set java.lang.library defining older,
existing Java directories which caused the reported runtime error (dlls loaded from wrong/older
installations).
For testing purposes foregoing that script will still cause the "java.lang.UnsatisfiedLinkError" to
occur, but now java.lang.library will have the current Java's bin-homedir such that on the next
attempt the proper dlls get found and loaded from there (this is true for both tested OpenJDK 21
plus JavaFX/Full versions of Azul and BellSoft).
This should be fixed nevertheless (to allow loading the proper dlls), but the problem by default is
not fatal, unless java.lang.library gets explicitly defined and would not have the current Java's
bin directory as its first directory but instead supplies other Java versions before it.
---rony
On 30.09.2023 18:31, Kevin Rushforth wrote:
Both companies have folks who monitor this list, so maybe they will see it and
respond.
In the meantime copying bin to bin/javafx is an easy-enough local "solution". :)
Yes.
-- Kevin
On 9/30/2023 8:53 AM, Rony G. Flatscher wrote:
On 30.09.2023 15:05, Kevin Rushforth wrote:
The JavaFX native files were deliberately moved from bin to bin/javafx in JavaFX 19. See
JDK-8281089 [1]. Using jlink with the JavaFX jmods will correctly put those libraries in
bin/javafx. I suspect that the JDK build procedure Azul and BellSoft use is not doing that.
-- Kevin
[1] https://bugs.openjdk.org/browse/JDK-8281089
Thank you very much, Kevin!
Not having accounts at Azul and BellSoft, there is no means to inform them, unfortunately. (Maybe
others on the list who have accounts could do so.)
In the meantime copying bin to bin/javafx is an easy-enough local "solution". :)
---rony
On 9/30/2023 4:40 AM, Rony G. Flatscher wrote:
Added the subdir "bin/javafx" then copied all files of "bin" into it after
which everything works.
Both OpenJDK 21 versions (Azul, Bellsouth) were downloaded as zip-archives, unzipped and
JAVA_HOME set accordingly, which has been working for all past versions. It seems that
somewhere a wrong configuration sneaked into 21 causing the loading of the dlls from the wrong,
non-existing subdirectory "bin/javafx".
---rony
On 29.09.2023 23:32, Rony G. Flatscher wrote:
Also, in this case JAVA_HOME is set as:
F:\work\svn\bsf4oorexx\branches\850\bsf4oorexx\samples\JavaFX>set j
JAVA_HOME=C:\Program Files\BellSoft\jdk-21-full
---rony
On 29.09.2023 23:29, Rony G. Flatscher wrote:
Sorry, had to go to an event in between.
On 29.09.2023 15:35, Kevin Rushforth wrote:
It generally doesn't matter where the Microsoft DLLs are loaded from. What I don't see in
your log is the loading of javafx_font.dll. That, and the other JavaFX libraries, are the
important ones.
This is interesting as well, here the occurrences of javafx_font.dll:
F:\work\svn\bsf4oorexx\branches\850\bsf4oorexx\samples\JavaFX>dir
C:\javafx_font.dll /s
Volume in drive C is root_c
Volume Serial Number is 2AF2-88BA
Directory of C:\Program Files\azul\zulu21_jdk21.0.0\bin
12.09.2023 14:02 77 864 javafx_font.dll
1 File(s) 77 864 bytes
Directory of C:\Program Files\BellSoft\jdk-18.0.1.1-full\bin
28.05.2022 04:41 76 992 javafx_font.dll
1 File(s) 76 992 bytes
Directory of C:\Program Files\BellSoft\jdk-21-full\bin
20.09.2023 01:11 77 504 javafx_font.dll
1 File(s) 77 504 bytes
Directory of C:\Program Files\BellSoft\LibericaJDK-17-Full\bin
12.01.2023 21:09 76 992 javafx_font.dll
1 File(s) 76 992 bytes
Directory of C:\Program Files (x86)\BellSoft\jdk8u312-full\jre\bin
16.10.2021 20:54 61 152 javafx_font.dll
1 File(s) 61 152 bytes
Directory of C:\Program Files (x86)\BellSoft\LibericaJDK-17-Full\bin
28.05.2022 02:52 62 144 javafx_font.dll
1 File(s) 62 144 bytes
Directory of C:\Program Files (x86)\BellSoft\LibericaJDK-8-Full\jre\bin
27.05.2022 22:59 61 632 javafx_font.dll
1 File(s) 61 632 bytes
Directory of
C:\Users\Administrator\.IdeaIC2019.3\system\tmp\patch-update\jre\bin
16.04.2020 17:59 80 408 javafx_font.dll
1 File(s) 80 408 bytes
Directory of
C:\Users\Administrator\AppData\Local\JetBrains\IdeaIC2020.1\tmp\patch-update\jre\bin
24.09.2020 16:30 80 408 javafx_font.dll
1 File(s) 80 408 bytes
Directory of C:\Users\Administrator\AppData\Local\SceneBuilder\runtime\bin
05.06.2018 13:48 58 792 javafx_font.dll
1 File(s) 58 792 bytes
Total Files Listed:
10 File(s) 713 888 bytes
0 Dir(s) 34 872 254 464 bytes free
Here here the relevant trace:
... cut ...
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\msvcp140_2.dll
Loaded C:\Program Files\BellSoft\LibericaJDK-17-Full\bin\msvcp140_2.dll from
java.library.path
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\prism_d3d.dll
Loaded C:\Program Files\BellSoft\LibericaJDK-17-Full\bin\prism_d3d.dll from
java.library.path
JavaFX: using com.sun.javafx.tk.quantum.QuantumToolkit
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\glass.dll
Loaded C:\Program Files\BellSoft\LibericaJDK-17-Full\bin\glass.dll from
java.library.path
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\javafx_font.dll
Loaded C:\Program Files\BellSoft\LibericaJDK-17-Full\bin\javafx_font.dll
from
java.library.path
Exception in Application start method
Exception in thread "JavaFX Application Thread"
java.lang.UnsatisfiedLinkError:
'java.lang.String
com.sun.javafx.font.directwrite.DWFactory.regReadFontLink(java.
lang.String)'
at
javafx.graphics/com.sun.javafx.font.directwrite.DWFactory.regReadFontLink(Native
Method)
at
javafx.graphics/com.sun.javafx.font.directwrite.DWFactory.getFallbacks(DWFactory.java:166)
at
javafx.graphics/com.sun.javafx.font.LogicalFont.getLinkedFonts(LogicalFont.java:214)
at
javafx.graphics/com.sun.javafx.font.LogicalFont.getNumSlots(LogicalFont.java:223)
at
javafx.graphics/com.sun.javafx.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
at
javafx.graphics/com.sun.javafx.font.LogicalFont.getGlyphMapper(LogicalFont.java:439)
at
javafx.graphics/com.sun.javafx.text.GlyphLayout.breakRuns(GlyphLayout.java:229)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.buildRuns(PrismTextLayout.java:819)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.layout(PrismTextLayout.java:1070)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.ensureLayout(PrismTextLayout.java:230)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.getBounds(PrismTextLayout.java:256)
at
javafx.controls/com.sun.javafx.scene.control.skin.Utils.computeTextWidth(Utils.java:129)
at
javafx.controls/javafx.scene.control.skin.LabeledSkinBase.computeMinLabeledPartWidth(LabeledSkinBase.java:809)
at
javafx.controls/javafx.scene.control.skin.LabeledSkinBase.computeMinWidth(LabeledSkinBase.java:306)
at
javafx.controls/javafx.scene.control.Control.computeMinWidth(Control.java:504)
at javafx.graphics/javafx.scene.Parent.minWidth(Parent.java:1049)
at
javafx.graphics/javafx.scene.layout.Region.minWidth(Region.java:1500)
at
javafx.graphics/javafx.scene.layout.Region.computeChildPrefAreaWidth(Region.java:1959)
at
javafx.graphics/javafx.scene.layout.AnchorPane.computeChildWidth(AnchorPane.java:344)
at
javafx.graphics/javafx.scene.layout.AnchorPane.layoutChildren(AnchorPane.java:380)
at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1208)
at javafx.graphics/javafx.scene.Scene.doLayoutPass(Scene.java:594)
at
javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2600)
at
javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:401)
at
java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at
javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:400)
at
javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:430)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:592)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:572)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:565)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:352)
at
javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
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:185)
at java.base/java.lang.Thread.run(Thread.java:1583)
Here the PATH environment variable in this case (no jdk17):
PATH=C:\Program
Files\BellSoft\jdk-21-full\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;e:\rony\tools;e:\vslick\win;C:\Program
Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files\Microsoft
DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance
Toolkit\;C:\Program
Files\gs\gs9.22\lib;C:\Program
Files\gs\gs9.22\bin;C:\WINDOWS\System32\OpenSSH\;C:\Program Files
(x86)\PuTTY\;C:\Program
Files\Intel\WiFi\bin\;C:\Program Files\Common
Files\Intel\WirelessCommon\;C:\Program
Files\TortoiseSVN\bin;C:\Program Files\TortoiseHg\;C:\Program
Files\TortoiseGit\bin;C:\Program Files\dotnet\;C:\Program Files
(x86)\AOMEI\AOMEI
Backupper\7.1.2;C:\Program Files\Git\cmd;C:\Program
Files\BSF4ooRexx850;c:\Program Files
(x86)\Intel\Intel(R) Management Engine Components\DAL;c:\Program
Files\Intel\Intel(R)
Management Engine Components\DAL;C:\Program
Files\oorexx;C:\Users\Administrator\AppData\Local\Programs\Python\Python311\Scripts\;C:\Users\Administrator\AppData\Local\Programs\Python\Python311\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Program
Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\
So JDK17 is not on PATH, but Java/JDK 21 finds JDK17, maybe from the registry entry for
"Computer\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\17.0.3" (only entry), having an entry of
"JavaHome" with the value of "C:\Program Files\BellSoft\LibericaJDK-17-Full".
Also key "Computer\HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\JDK\17.0.3\MSI" having an entry for
"INSTALLDIR" of "C:\Program Files\BellSoft\LibericaJDK-17-Full\".
So it seems that JDK21's java.exe will not find the dlls in the non-existing
"*\jdk-21-full\javafx\" directory and eventually resorting to the registry entry to lookup
JDK 17.
---rony
On 9/29/2023 6:30 AM, Rony G. Flatscher wrote:
On 29.09.2023 14:53, Kevin Rushforth wrote:
This is a new native method (actually moved from another class) in JavaFX 21. This is very
likely due to a mismatch between the native library and the Java classes. I suspect you
have a directory in your PATH that is picking up an old javafx_font.dll library. Run your
program with "-Djavafx.verbose=true" to see where the library is loaded from.
Thank you, this is the output:
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\api-ms-win-core-console-l1-1-0.dll
Loaded C:\Program Files\TortoiseGit\bin\api-ms-win-core-console-l1-1-0.dll
from
java.library.path
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\api-ms-win-core-console-l1-2-0.dll
System.loadLibrary(api-ms-win-core-console-l1-2-0) succeeded
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\api-ms-win-core-datetime-l1-1-0.dll
Loaded C:\Program Files\TortoiseGit\bin\api-ms-win-core-datetime-l1-1-0.dll
from
java.library.path
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\api-ms-win-core-debug-l1-1-0.dll
Loaded C:\Program Files\TortoiseGit\bin\api-ms-win-core-debug-l1-1-0.dll
from
java.library.path
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\api-ms-win-core-errorhandling-l1-1-0.dll
Loaded C:\Program
Files\TortoiseGit\bin\api-ms-win-core-errorhandling-l1-1-0.dll from
java.library.path
WARNING: java.lang.UnsatisfiedLinkError: Can't load library: C:\Program
Files\BellSoft\jdk-21-full\bin\javafx\api-ms-win-core-file-l1-1-0.dll
Loaded C:\Program Files\TortoiseGit\bin\api-ms-win-core-file-l1-1-0.dll from
java.library.path
... cut ...
So indeed, it seems to be picking up those dlls from TortoiseGit.
The dlls are there:
C:\Program Files\BellSoft\jdk-21-full\bin
Directory of C:\Program Files\BellSoft\jdk-21-full\bin
19.09.2023 17:09 22 008 api-ms-win-core-console-l1-1-0.dll
19.09.2023 17:09 21 992 api-ms-win-core-console-l1-2-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-datetime-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-core-debug-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-core-errorhandling-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-core-fibers-l1-1-0.dll
19.09.2023 17:09 26 120 api-ms-win-core-file-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-file-l1-2-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-file-l2-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-handle-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-core-heap-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-core-interlocked-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-libraryloader-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-core-localization-l1-2-0.dll
19.09.2023 17:09 21 984 api-ms-win-core-memory-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-core-namedpipe-l1-1-0.dll
19.09.2023 17:09 22 008
api-ms-win-core-processenvironment-l1-1-0.dll
19.09.2023 17:09 22 024
api-ms-win-core-processthreads-l1-1-0.dll
19.09.2023 17:09 21 984
api-ms-win-core-processthreads-l1-1-1.dll
19.09.2023 17:09 21 984 api-ms-win-core-profile-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-core-rtlsupport-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-string-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-synch-l1-1-0.dll
19.09.2023 17:09 21 968 api-ms-win-core-synch-l1-2-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-sysinfo-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-core-timezone-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-core-util-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-crt-conio-l1-1-0.dll
19.09.2023 17:09 26 104 api-ms-win-crt-convert-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-crt-environment-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-crt-filesystem-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-crt-heap-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-crt-locale-l1-1-0.dll
19.09.2023 17:09 30 176 api-ms-win-crt-math-l1-1-0.dll
19.09.2023 17:09 30 216 api-ms-win-crt-multibyte-l1-1-0.dll
19.09.2023 17:09 75 232 api-ms-win-crt-private-l1-1-0.dll
19.09.2023 17:09 22 008 api-ms-win-crt-process-l1-1-0.dll
19.09.2023 17:09 26 080 api-ms-win-crt-runtime-l1-1-0.dll
19.09.2023 17:09 26 120 api-ms-win-crt-stdio-l1-1-0.dll
19.09.2023 17:09 26 120 api-ms-win-crt-string-l1-1-0.dll
19.09.2023 17:09 21 984 api-ms-win-crt-time-l1-1-0.dll
19.09.2023 17:09 22 024 api-ms-win-crt-utility-l1-1-0.dll
but the look-up is using "C:\Program Files\BellSoft\jdk-21-full\bin\javafx\..."
The Windows PATH starts out with:
PATH=C:\Program Files\BellSoft\jdk-21-full\bin;... cut ...
---rony
On 9/29/2023 5:06 AM, Rony G. Flatscher wrote:
Downloaded the 64-bit OpenJDK21 package for Windows that include JavaFX from Azul ("FX")
and Bellsouth ("full").
Both packages cause the following error:
Exception in Application start method
Exception in thread "JavaFX Application Thread"
java.lang.UnsatisfiedLinkError:
'java.lang.String com.sun.javafx.font.direct
write.DWFactory.regReadFontLink(java.lang.String)'
at
javafx.graphics/com.sun.javafx.font.directwrite.DWFactory.regReadFontLink(Native
Method)
at
javafx.graphics/com.sun.javafx.font.directwrite.DWFactory.getFallbacks(DWFactory.java:166)
at
javafx.graphics/com.sun.javafx.font.LogicalFont.getLinkedFonts(LogicalFont.java:214)
at
javafx.graphics/com.sun.javafx.font.LogicalFont.getNumSlots(LogicalFont.java:223)
at
javafx.graphics/com.sun.javafx.font.CompositeGlyphMapper.<init>(CompositeGlyphMapper.java:62)
at
javafx.graphics/com.sun.javafx.font.LogicalFont.getGlyphMapper(LogicalFont.java:439)
at
javafx.graphics/com.sun.javafx.text.GlyphLayout.breakRuns(GlyphLayout.java:229)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.buildRuns(PrismTextLayout.java:819)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.layout(PrismTextLayout.java:1070)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.ensureLayout(PrismTextLayout.java:230)
at
javafx.graphics/com.sun.javafx.text.PrismTextLayout.getBounds(PrismTextLayout.java:256)
at
javafx.controls/com.sun.javafx.scene.control.skin.Utils.computeTextWidth(Utils.java:129)
at
javafx.controls/javafx.scene.control.skin.LabeledSkinBase.computeMinLabeledPartWidth(LabeledSkinBase.java:809)
at
javafx.controls/javafx.scene.control.skin.LabeledSkinBase.computeMinWidth(LabeledSkinBase.java:306)
at
javafx.controls/javafx.scene.control.Control.computeMinWidth(Control.java:504)
at javafx.graphics/javafx.scene.Parent.minWidth(Parent.java:1049)
at
javafx.graphics/javafx.scene.layout.Region.minWidth(Region.java:1500)
at
javafx.graphics/javafx.scene.layout.Region.computeChildPrefAreaWidth(Region.java:1959)
at
javafx.graphics/javafx.scene.layout.AnchorPane.computeChildWidth(AnchorPane.java:344)
at
javafx.graphics/javafx.scene.layout.AnchorPane.layoutChildren(AnchorPane.java:380)
at javafx.graphics/javafx.scene.Parent.layout(Parent.java:1208)
at javafx.graphics/javafx.scene.Scene.doLayoutPass(Scene.java:594)
at
javafx.graphics/javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2600)
at
javafx.graphics/com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:401)
at
java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at
javafx.graphics/com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:400)
at
javafx.graphics/com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:430)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:592)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:572)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:565)
at
javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:352)
at
javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
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:185)
at java.base/java.lang.Thread.run(Thread.java:1583)
Would anyone know how to fix this, if possible at all?
---rony