OpenJDK 21 with FX (Azul, Bellsouth) on Windows: java.lang.UnsatisfiedLinkError: 'java.lang.String com.sun.javafx.font.direct, write.DWFactory.regReadFontLink(java.lang.String)'
Rony G. Flatscher
Rony.Flatscher at wu.ac.at
Fri Sep 29 13:30:50 UTC 2023
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
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20230929/7434effe/attachment-0001.htm>
More information about the openjfx-dev
mailing list