Create an excutable jar in IntelliJ IDEA
I am using IntelliJ IDEA 12.1.3. I have one module and I am trying to convert it into a jar as per the steps given here . I built the jar file and I moved the jar file to D:/. If I try to run this jar I get the following message: Failed to load Main-Class manifest attribute from jar If I run it using java -classpath jar com.code.TestCase it works perfectly. Why does this happen? I created the jar using IntelliJ IDEA. In that jar it has all the code for all external libraries which I added. In the src manifest file: Manifest-Version: 1.0 Main-Class: com.code.TestCase but the jar's manifest file