Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provided GUI jar does not work on Linux and MacOS. #51

Open
Acuadragon100 opened this issue Aug 2, 2023 · 0 comments
Open

Provided GUI jar does not work on Linux and MacOS. #51

Acuadragon100 opened this issue Aug 2, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@Acuadragon100
Copy link

Problem:

The application only includes the native skiko library for the current operating system.
This means that the version up for download (which was built for Windows) only includes the dll libraries for Windows x64 and therefore does not work on Linux and MacOS.

Full Error:

Exception in thread "main" java.lang.ExceptionInInitializerError
        at androidx.compose.ui.awt.ComposeLayer.<init>(ComposeLayer.desktop.kt:64)
        at androidx.compose.ui.awt.ComposeWindowDelegate.<init>(ComposeWindowDelegate.desktop.kt:52)
        at androidx.compose.ui.awt.ComposeWindow.<init>(ComposeWindow.desktop.kt:61)
        at androidx.compose.ui.awt.ComposeWindow.<init>(ComposeWindow.desktop.kt:59)
        at androidx.compose.ui.window.Window_desktopKt$Window$3.invoke(Window.desktop.kt:178)
        at androidx.compose.ui.window.Window_desktopKt$Window$3.invoke(Window.desktop.kt:172)
        at androidx.compose.ui.window.Window_desktopKt$Window$10$1.invoke(Window.desktop.kt:403)
        at androidx.compose.ui.window.Window_desktopKt$Window$10$1.invoke(Window.desktop.kt:402)
        at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$2.invoke(AwtWindow.desktop.kt:74)
        at androidx.compose.ui.window.AwtWindow_desktopKt$AwtWindow$2.invoke(AwtWindow.desktop.kt:73)
        at androidx.compose.runtime.DisposableEffectImpl.onRemembered(Effects.kt:81)
        at androidx.compose.runtime.CompositionImpl$RememberEventDispatcher.dispatchRememberObservers(Composition.kt:1105)
        at androidx.compose.runtime.CompositionImpl.applyChangesInLocked(Composition.kt:820)
        at androidx.compose.runtime.CompositionImpl.applyChanges(Composition.kt:842)
        at androidx.compose.runtime.Recomposer.composeInitial$runtime(Recomposer.kt:994)
        at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:519)
        at androidx.compose.ui.window.Application_desktopKt$awaitApplication$2$1$2.invokeSuspend(Application.desktop.kt:219)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
        at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
        at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
        at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
        at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
        at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
        at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
        at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
        at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
        at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: org.jetbrains.skiko.LibraryLoadException: Cannot find libskiko-linux-x64.so.sha256, proper native dependency missing.
        at org.jetbrains.skiko.Library.findAndLoad(Library.kt:105)
        at org.jetbrains.skiko.Library.load(Library.kt:59)
        at org.jetbrains.skiko.SkiaLayer.<clinit>(SkiaLayer.awt.kt:31)
        ... 32 more

Suggested Solution:

Change the gradle configuration of the GUI application to bundle compose for all operating systems and architectures rather than just the current operating system. Alternatively build multiple binaries for different operating systems and architectures.

Workaround for users:

Option 1:

  1. Download the awt-runtime jar file for your operating system from https://github.com/JetBrains/skiko/releases/.
  2. Extract the .so, .dll or .dylib files as well as the .sha256 files.
  3. Insert the extracted files into the jNeedle GUI jar file.

Option 2:

Compile the application yourself.

@KosmX KosmX self-assigned this Aug 2, 2023
@KosmX KosmX added the bug Something isn't working label Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants