Creating an executable .jar using Intellij

intellij-idea, jar, java

Solution

One of the jars you extracted to the target jar was signed. The easiest way to fix it is to select "copy to the output directory and link via manifest" in the "Create JAR from Modules" dialog

Problem

I've got an app which is using few external `jar`s like `mail-1.4` and etc. And now I want to execute my app out of IDE (`IntelliJ`). Also I was following instruction File>Project Structure>Artifacts and so on, but my command prompt says: ``` Exception in thread "main" java.lang.SecurityException: Invalid signature file igest for Manifest main attributes at sun.security.util.SignatureFileVerifier.processImpl(Unknown Source) at sun.security.util.SignatureFileVerifier.process(Unknown Source) at java.util.jar.JarVerifier.processEntry(Unknown Source) at java.util.jar.JarVerifier.update(Unknown Source) at java.util.jar.JarFile.initializeVerifier(Unknown Source) at java.util.jar.JarFile.getInputStream(Unknown Source) at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Source) at sun.misc.Resource.cachedInputStream(Unknown Source) at sun.misc.Resource.getByteBuffer(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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) ``` My `MANIFEST` is almost empty: ``` Manifest-Version: 1.0 Main-Class: ru.tenet.smsc.SMSC ``` What is wrong?

Original source

Related problems