开发者

ant jar's mainclass

开发者 https://www.devze.com 2022-12-18 07:36 出处:网络
how d开发者_如何学Pythono i set the Main-Class attribute of my jar in ant?Create a manifest: <manifest file=\"build/MANIFEST.MF\">

how d开发者_如何学Pythono i set the Main-Class attribute of my jar in ant?


Create a manifest:

<manifest file="build/MANIFEST.MF">
  <attribute name="Main-Class"
             value="foo.FooMain" />
</manifest>
<jar destfile="build/foo.jar"
     manifest="build/MANIFEST.MF">
  <fileset dir="build/classes" />
</jar>


You can specify it in the manifest by using the Manifest nested element of the Jar task. Set Main-Class to the required class.

0

精彩评论

暂无评论...
验证码 换一张
取 消