apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.68k stars 854 forks source link

A java.lang.UnsatisfiedLinkError has occurred #7065

Closed gotopublic closed 8 months ago

gotopublic commented 9 months ago

Apache NetBeans version

Apache NetBeans 21 release candidate

What happened

java.lang.UnsatisfiedLinkError: no jfxwebkit in java.library.path: [C:\netbeans21\bin, C:\Windows\Sun\Java\bin, C:\Windows\system32, C:\Windows, C:\Python312\Scripts\, C:\Python312\, C:\Program Files\Common Files\Oracle\Java\javapath, C:\Program Files (x86)\Common Files\Oracle\Java\javapath, C:\Windows\system32, C:\Windows, C:\Windows\System32\Wbem, C:\Windows\System32\WindowsPowerShell\v1.0\, C:\Windows\System32\OpenSSH\, C:\Program Files\dotnet\, C:\Program Files\Git\cmd, C:\Program Files\nodejs\, C:\ProgramData\chocolatey\bin, C:\Program Files\Microsoft SQL Server\130\Tools\Binn\, C:\Users\THEO\AppData\Local\Microsoft\WindowsApps, %CLion%, C:\Users\THEO\AppData\Roaming\npm, .]
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2678)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
    at java.base/java.lang.System.loadLibrary(System.java:1886)
    at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:166)
    at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:54)
    at javafx.web/com.sun.webkit.WebPage.lambda$static$0(WebPage.java:135)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.web/com.sun.webkit.WebPage.<clinit>(WebPage.java:134)
    at javafx.web/javafx.scene.web.WebEngine.<init>(WebEngine.java:854)
    at javafx.web/javafx.scene.web.WebEngine.<init>(WebEngine.java:839)
    at javafx.web/javafx.scene.web.WebView.<init>(WebView.java:271)
    at org.netbeans.core.browser.webview.ext.WebBrowserImpl.createBrowser(WebBrowserImpl.java:503)
    at org.netbeans.core.browser.webview.ext.WebBrowserImpl.access$000(WebBrowserImpl.java:97)
    at org.netbeans.core.browser.webview.ext.WebBrowserImpl$1.run(WebBrowserImpl.java:161)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
[catch] at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    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:184)
    at java.base/java.lang.Thread.run(Thread.java:829)

messages.log

Language / Project Type / NetBeans Component

HTML app with nodejs

How to reproduce

This happened when node server starts

Did this work correctly in an earlier version?

No / Don't know

Operating System

windows 11

JDK

11

Apache NetBeans packaging

Apache NetBeans provided installer

Anything else

No response

Are you willing to submit a pull request?

No

matthiasblaesing commented 9 months ago

I had a look at the JDK download from OpenLogic. They bundle JavaFX/OpenJFX, BUT what I did not see in the zip was the webkit library. Two options:

  1. Use another JDK (I prefer Amazon Corretto), that either does not bundle OpenJFX or includes in a working form. I suggest to get a more recent JDK. For NB20 I would prefer JDK 17, for NB 21 I would prefer JDK 21.
  2. Don't use the embedded browser. (Go to Tools -> Options -> General and choose a different webbrowser.

Please check if one of the options fixes it for you.

gotopublic commented 9 months ago

I had a look at the JDK download from OpenLogic. They bundle JavaFX/OpenJFX, BUT what I did not see in the zip was the webkit library. Two options:

  1. Use another JDK (I prefer Amazon Corretto), that either does not bundle OpenJFX or includes in a working form. I suggest to get a more recent JDK. For NB20 I would prefer JDK 17, for NB 21 I would prefer JDK 21.
  2. Don't use the embedded browser. (Go to Tools -> Options -> General and choose a different webbrowser.

Please check if one of the options fixes it for you.

thanks i will give it a try