I'm getting an interesting error. I'm using the jetbrains compose library for JVM and trying to build a JAR file so the project can run outside of IntelliJ's run.
My code matched what that article recommends, but I did not know about the gradle tasks. Running those, I get a binary built, but I'm still struggling with the "could not find or load main class" error that I get with a lot of jars on my system.
Landry Norris
08/24/2021, 8:45 PM
I don't know if the "could not find or load main class" error is even related to kotlin. I used jar -tf to list classes, and the class I set as main was right. I unzipped the jar, and I could see that the class was there and the fq name matched. There may just be an issue with my JDK. Sometimes when I specify the main class (exact same as is in the Manifest file) explicitly, it will run, but then hits random native errors that I don't see when running in intellij.