Including Modules in Artifact Build
How do I include my Modules in the artifact build. I am making a scoreboard software that needs to be the same cross-platform, so I installed a L&F. This works great in the editor but I get the error: “Exception in thread "main" java.lang.NoClassDefFoundError: com/formdev/flatlaf/FlatLightLaf
at ScoreBoard.ScoreBoard.main(ScoreBoard.java:34)
Caused by: java.lang.ClassNotFoundException: com.formdev.flatlaf.FlatLightLaf
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 1 more”
I am assuming it is due to it not going through properly but I don't know.
Please sign in to leave a comment.
Hello!
Which Build System (Gradle, Maven, IDEA Native) does your Project use?
Was LAF added as a dependency/library?
How are you building the Artifact?
I am using IDEA Native. And the LAF was added as a library. I am not sure what you mean by how I am building the artifact.
Make sure all the dependencies are included in the artifact, see https://www.jetbrains.com/help/idea/artifacts.html.
If the issue remains, please provide a sample project illustrating the problem and the exact steps to reproduce.
I ended up figuring it out. For some reason i have to delete the artifact output and re configure it every time i add a module.