• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Manifest file problems

 
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I posted about a week ago, on this problem, and still im having problems. Just trying to create an executable jar file. This is what im doing. At the command line I'm typing:

jar cvfm package.jar manifest.mf "C:\mydocuments\Messenger"

my manifest file looks exactly like this: Main-Class: mainClass.java

yet when i run the executable jar file, it sais it cannot find the main class? what am i doing wrong? Thanks in advance for the help.
 
Ranch Hand
Posts: 961
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Main-Class is not the OS file path to the java class, but the actual package path to the class.

Main-Class: com.ranch.Application
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As Jeff says, the class name is what goes in the "Main-Class" line. Also note that the jar file itself must contain the compiled *.class file; the *.java file is no use here.
 
reply
    Bookmark Topic Watch Topic
  • New Topic