Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

IntelliJ Idea no manifest

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm playing with Java, and struggling with the IDE. I have nothing more than a simple HelloWorld Maven app. I instructed the configuration to build a jar artifact when I run it. The app runs fine in the ide, "Hello World!". When I try to run the jar from the command line, however, I get:

andrew@andrew-satellite:~/IdeaProjects/HelloWorld/out/artifacts/HelloWorld_jar$ java -jar HelloWorld.jar
no main manifest attribute, in HelloWorld.jar

My manifest:

Manifest-Version: 1.0
Main-Class: com.gmail.myemail.Main

My Main.class:

package com.gmail.myemail;

public class Main {
   public static void main(String[] args) {
       System.out.println("Hello World!");
   }
}

What have I done wrong here?
Staff note (Paul Clapham) :

I moved this thread to the Intellij IDEA forum.

 
A Diamond
Greenhorn
Posts: 8
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it out. Something weird with Idea, found the solution here:
https://stackoverflow.com/questions/1082580/how-to-build-jars-from-intellij-properly/45303637#45303637
 
Sheriff
Posts: 7111
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for posting your solution back here!
 
reply
    Bookmark Topic Watch Topic
  • New Topic