theapache64 / stackzy

💻 A cross-platform desktop application to identify libraries used inside an android application. Made possible by Compose Desktop ⚡
Apache License 2.0
1.04k stars 56 forks source link

UberJar not working #41

Closed theapache64 closed 3 years ago

theapache64 commented 3 years ago

Describe the bug

I've downloaded Stackzy-linux-x64-1.0.0.jar from the releases (v1.0.0-beta03) and executed with java -jar Stackzy-linux-x64-1.0.0.jar, but am getting below error

Crashlog ``` Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes at java.base/sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:335) at java.base/sun.security.util.SignatureFileVerifier.process(SignatureFileVerifier.java:268) at java.base/java.util.jar.JarVerifier.processEntry(JarVerifier.java:273) at java.base/java.util.jar.JarVerifier.update(JarVerifier.java:230) at java.base/java.util.jar.JarFile.initializeVerifier(JarFile.java:759) at java.base/java.util.jar.JarFile.ensureInitialization(JarFile.java:1038) at java.base/java.util.jar.JavaUtilJarAccessImpl.ensureInitialization(JavaUtilJarAccessImpl.java:69) at java.base/jdk.internal.loader.URLClassPath$JarLoader$2.getManifest(URLClassPath.java:873) at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:807) at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:719) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:642) at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:600) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:427) at java.base/sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:760) at java.base/sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:655) ```

To Reproduce Steps to reproduce the behavior:

  1. Download any uberjar from here
  2. Execute it using java -jar Stackzy-*.jar
  3. See error

Expected behavior Should launch Stackzy window

Screenshots

image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

theapache64 commented 3 years ago

Could be helpful : https://stackoverflow.com/a/14441628/4370279

mikepenz commented 3 years ago

we use the jar bundling from compose desktop here. https://github.com/theapache64/stackzy/blob/master/.github/workflows/ci.yml#L112

packageUberJarForCurrentOS

maybe something changed for linux? it used to work on mac at least

mikepenz commented 3 years ago

Double checked. no longer works for mac either.

theapache64 commented 3 years ago

@mikepenz Probably because of the libraries we recently added :thinking:

letroll commented 3 years ago

no longer works for windows either.

theapache64 commented 3 years ago

@letroll thanks for the feedback. am planning to work on this issue this weekend.

theapache64 commented 3 years ago

@letroll Please try this release. Feel free to reopen this issue if it still exists.

letroll commented 3 years ago

Sorry but not better with this deliverable with java 1.8:

java -jar Stackzy-windows-x64-1.0.0.jar Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: org/jetbrains/skiko/SkiaLayer has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.defineClass(Unknown Source) at java.net.URLClassLoader.access$100(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at androidx.compose.desktop.ComposeLayer.(ComposeLayer.desktop.kt:58) at androidx.compose.desktop.ComposeWindow.(ComposeWindow.desktop.kt:31) at androidx.compose.desktop.AppWindow.(AppWindow.desktop.kt:114) at androidx.compose.desktop.AppWindow.(AppWindow.desktop.kt) at androidx.compose.desktop.AppWindow_desktopKt$Window$1.run(AppWindow.desktop.kt:83) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$500(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)

theapache64 commented 3 years ago

@letroll Ohh.. forgot to mention, you need Java 15 to run any compose desktop app via the uber-jar. However, this is not a problem if you can try Stackzy by installing the msi version (Windows) or deb (Linux).