免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1745 | 回复: 1
打印 上一主题 下一主题

[转]用Eclipse打JAR包 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-04-17 16:12 |只看该作者 |倒序浏览

用Eclipse打JAR包
To create a new JAR file in the workbench:

  • In the Package Explorer, you can optionally pre-select one or more Java elements to export. (These will be automatically selected in the JAR Package Specification wizard page, described in Step 4.)

  • From the menu bar, select File > Export.

  • Select JAR file, then click Next.

  • In the Jar Package Specification page, select the resources that you want to export in the Select the resources to export field.

  • Select the appropriate check box to specify whether you want to Export generated class files and resources or Export Java source files and resources.
    Note: Selected resources are exported in both cases.

  • In the Select the export destination field, either type or click Browse to select a location for the JAR file.

  • Select or clear the Compress the contents of the JAR file check box.

  • Select or clear the Overwrite existing files without warning check box. If you clear thischeck box, then you will be prompted to confirm the replacement of each file that will be overwritten.
    Note: The overwrite option is applied when writing the JAR file, the JAR description, and the manifest file.

  • You have two options:

  • Click Finish to create the JAR file immediately.

  • Click Next to use the JAR Packaging Options page to set advanced options, create a JAR description, or change the default manifest.
    ========================================

    要选择main class,不然会报错找不到class


    本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/38200/showart_1902674.html
  • 论坛徽章:
    0
    2 [报告]
    发表于 2009-04-21 13:46 |只看该作者
    这样打成jar包,项目本身的jar包就不包含在里面。。建议用打jar包的插件。。
    您需要登录后才可以回帖 登录 | 注册

    本版积分规则 发表回复

      

    北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
    未成年举报专区
    中国互联网协会会员  联系我们:huangweiwei@itpub.net
    感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

    清除 Cookies - ChinaUnix - Archiver - WAP - TOP