how to run a jar file created using intellij 12

vronniithv

New Member
I am using Intellij IDEA 12.0.4 on MAC OS X 10.8.3 to create a jar file. I go to File -> Project Structure -> Artifacts -> + -> Jar -> From modules with dependencies -> Selected Main Class after browsing -> selected extract to the target jar -> Directory for META-INF automatically gets populated -> OK -> Apply -> OK -> Build -> Build Artifacts -> BuildNow If I try to run jar using:\[code\]java -jar path_to_jar/jar_file\[/code\]I get this error\[code\]no main manifest attribute, in path_to_jar/jar_file$ java -versionjava version "1.7.0_17"Java(TM) SE Runtime Environment (build 1.7.0_17-b02)Java HotSpot(TM) 64-Bit Server VM (build 23.7-b01, mixed mode)\[/code\]Any pointers, what I am doing wrong?
 
Back
Top