title: How do I create a runnable JAR in IntelliJ as I would in Eclipse
body: <p>My process for creating a runnable JAR from a project with many libraries with Eclipse has been.</p>
  
  <p><strong>Export > Runnable JAR > Select launch configuration > Package required libraries into generated JAR > Finish</strong></p>
  
  <p>This creates a single JAR in my export destination which I FTP to my server and run fine.</p>
  
  <p>I recently switched to IntelliJ for various reasons and it has been an improvement in all cases except for building my JARs which forces me to go back to eclipse temporarily.</p>
  
  <p>With IntelliJ I:</p>
  
  <p>Open Project Structure > Artifacts and create a new JAR from modules with dependencies. I then have my output layout with the name of the JAR, a META-INF inside it and all my libaries with the format <code>Extracted &lt;lib.jar/&gt;</code> (sorry I can't upload screenshots on this VPN.)</p>
  
  <p>I build my artifact (which is about 15MB bigger) and FTP it to my server, try to run it and I get the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes
  </code></pre>
  
  <p>How do I mimic how I do it in Eclipse?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>The two JARs that are created differ considerably:</p>
  
  <p>The valid jar that Eclipse creates looks like this:
  <a href="https://i.stack.imgur.com/3J9S7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/3J9S7.png" alt="Good jar"></a></p>
  
  <p>Whereas the invalid .JAR looks like this:
  <a href="https://i.stack.imgur.com/1rShu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/1rShu.png" alt="Bad jar"></a></p>