Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help: executable jar file

 
Ying Ren
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have finished the assignment. I found it is hard to explain how to set classpath both in windows and unix. So i decided to use executable jar file. But why it alway has the error:Fail to load main-Class manifest attribute from ...
How to solve the problem?
Another question,is there any specification about the final package name. should use the ID or whatever?
Thanks
Best
 
Robin Underwood
Ranch Hand
Posts: 117
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you need is a Main-class header in your manifest file to identify which class is executable.

Then jar using -cmfv options.
Final jar name info is copied from another link:
"The name of your submission archive file MUST be derived from your i.d. as shown here. (Note that in the United States, your i.d. is your 9-digit social security number, e.g. 555443333. Outside the U.S., your i.d. might be 9 digits, or it might be 2 characters followed by 7 digits, e.g. sp1234567.) Your archive filename MUST BE scjda-AAAAAAAAA.ZZZ, where AAAAAAAAA is your i.d., and
ZZZ is the appropriate filename extension for your archive type (zip, tar, or jar)."
[ July 31, 2002: Message edited by: Robin Underwood ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic