• Post Reply Bookmark Topic Watch Topic
  • New Topic

Main-Class attribute in MANIFEST.MF  RSS feed

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there way to specify in the MANIFEST.MF that the class for the Main-Class attribute is inside a jar ?

e.g. Consider Example.ear with this structure

If I specify a class in foo.jar to be the Main-Class, it throws back a ClassNotFoundException. But if archive the ear with an exploded foo.jar, it works fine.

Regards,

Pho
 
Sreenivasa Majji
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In side the jar task add the following:
<manifest>
<attribute name="Main-Class" value="your_main_class_with_complete_package"/>
</manifest>


Hope this helps,
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!