JDK invalid target release

Suppose we just run into this error: And you use IntelliJ IDEA. The thing is that you need to double check at least four places that you have chosen the proper JDK version. Step #1 First things first, make sure that you have JDK 21 selected under File -> Project Settings -> Project -> SDK: […]

READ MORE

Gradle NoClassDefFoundError XmlSlurper

If you getting this error: while building your app through Gradle, most likely that means that some of your Gradle plugins are not compatible with your version of Gradle. Consider changing either Gradle to the appropriate version or a problematic Gradle plugin. In my case, the latest com.github.ben-manes.versions plugin version was not compatible with my Gradle 6.x.

READ MORE

Gradle use specific JDK

If you working with IntelliJ IDEA you may notice, that changing Project’s JDK version is not affected to Gradle build/run. To force Gradle to use a specific JDK version / vendor you merely need to change Gradle JVM version in IntelliJ IDEA settings:  Settings → Build, Execution, Deployment → Build Tools → Gradle → Gradle […]

READ MORE

No implementation of L32X64MixRandom

You may encounter exception, that states: The reason is JDK/JRE version and vendor. I noticed, that at least JBR-17 (JetBrains Runtime) hasn’t got L32X64MixRandom algorithm. You may want to switch to Azul-17 (Azul Zulu) to make it works again. If you build/run your application with Gradle, don’t forget to change Gradle JVM version in IntelliJ […]

READ MORE

Invalid signature file digest

Full error text: This error can be encountered if there are signed libraries among the dependencies of your project. To solve the problem, you need to exclude files with the extensions .SF, .DSA, .RSA from the build. Of course, we will assume that you are building uber jar (fat jar). For Maven: For Gradle: Complete […]

READ MORE

No main manifest attribute Gradle Kotlin DSL

You can get this error if you try to run jar without specifying the name of the class that contains fun main() and which you want to run. To do this, you need to register the full class name in the Main-Class key of your manifest. Plain jar without dependencies You need to replace the […]

READ MORE

Uber JAR with Gradle Kotlin DSL

In this article, we will find a solution to the question – how to make an uber jar Gradle Kotlin DSL or how to make a fat jar Gradle Kotlin DSL. Let’s add this to build.gradle.kts file: After that, you can build the jar with dependencies: That’s all. Possible errors Error: no main manifest attribute, […]

READ MORE