• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

i am facing problem in creating jar file  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • 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
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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
  • 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: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • 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
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • 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.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!