Software works in Intellij but not as a jar file

已回答

So I'm trying to build an Arctifact which is an Executable Jar and before I add a maven dependency to Dynamic Reports, my jar was building fine but then when I added it and built my jar, java can't find or load my main class which makes no senses because it was building fine before. Is there a way to find what my jar is missing? Is there a file in my jar that would change the "root" folder in my jar instead of the "real root"?

Thanks for the help

 

Baskwo

0

It could happen if you package some jars inside which are digitally signed.

See also http://stackoverflow.com/a/42200519/104891 for the sample project.

0
Avatar
Permanently deleted user

Thank you for your answer but I do extract them into the jar :/

0
Avatar
Permanently deleted user

Seems like Bouncy Castle jars are signed. Is there a way in Intellij to remove the .sf and .dsa files of the artificat?

Or what do I need to do to accept the signed files

0
Avatar
Permanently deleted user

So my solution was to not extract Bouncy Castle and just put the BouncyCastle Jar into mine from Intellij. Seems to work now.

0

When an application runs correctly in IntelliJ but fails after exporting to a JAR, the issue is often related to missing dependencies, incorrect classpaths, or resources not being packaged properly in the build. It’s worth checking your build configuration and confirming that all required libraries are included in the final artifact. I ran into a similar packaging problem while working with 3D printing tools that generate G-code from models. Some Java-based utilities behave differently once compiled. For reference, this guide on Orca Slicer explains the software setup and system requirements pretty well, sometimes reviewing how tools package and distribute their builds can reveal what might be missing in your JAR setup. Clicks here!

 

0

请先登录再写评论。