• 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

i am facing problem in creating jar file

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i am creating the jar file manually (by writing the manifest file then using command prompt)
jar file created successfully.while executing the jar file it is showing like "main class not found"
what could be the problem?
 
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

mohan raj v wrote:
jar file created successfully.while executing the jar file it is showing like "main class not found"



It means your main class(class with main method) has not configured properly in Manifest file, may be path/ package problem.
Have look at this.
 
Ranch Hand
Posts: 221
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i got the same error message
i think you can solve this problem by pressing ENTER button after typing main-class name.
i dont know what it really does.But it fixed my issue
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Harilal
You got that almost right. The manifest file is expected to have an "empty line" at the end. So if your main class is not the last attribute, your logic will not work !

Moving to more appropriate forum.
 
Sagar Rohankar
Ranch Hand
Posts: 2908
1
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

harilal ithikkat wrote:
i think you can solve this problem by pressing ENTER button after typing main-class name.
i dont know what it really does.But it fixed my issue


Look at the link I had given, it clearly mention a note ,


Main-Class: psae.HelloWorld
Note: make sure you type a carriage return after this line; some windows systems need it and will report a "Failed to load Main-Class manifest attribute" error

 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic