`
MEZboy
  • 浏览: 4182 次
  • 性别: Icon_minigender_1
  • 来自: 北京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

用myeclipse8生成jar包

阅读更多

java做了一个导入的小工具,完成的项目要打成jar

1.项目截图

<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter"/> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0"/> <v:f eqn="sum @0 1 0"/> <v:f eqn="sum 0 0 @1"/> <v:f eqn="prod @2 1 2"/> <v:f eqn="prod @3 21600 pixelWidth"/> <v:f eqn="prod @3 21600 pixelHeight"/> <v:f eqn="sum @0 0 1"/> <v:f eqn="prod @6 1 2"/> <v:f eqn="prod @7 21600 pixelWidth"/> <v:f eqn="sum @8 21600 0"/> <v:f eqn="prod @7 21600 pixelHeight"/> <v:f eqn="sum @10 21600 0"/> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/> <o:lock v:ext="edit" aspectratio="t"/> </v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:195pt; height:357.75pt;mso-wrap-style:square;mso-position-horizontal-relative:page; mso-position-vertical-relative:page'> <v:imagedata src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtml1\01\clip_image001.png" o:href="http://hiphotos.baidu.com/zhifeichuan/pic/item/9189af126690ab565baf5313.jpg"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

此项目包含多个包、properties文件、第三方jar

2.右键单击项目-->export-->JAR File

<!--[if gte vml 1]><v:shape id="_x0000_i1026" type="#_x0000_t75" style='width:135pt;height:55.5pt;mso-wrap-style:square; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtml1\01\clip_image003.png" o:href="http://hiphotos.baidu.com/zhifeichuan/pic/item/2d1dd7eddb674a7363d09fe8.jpg"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->
单击下一步。如果要将properties文件放在jar包里,选中整个项目即可。否则只选择src下的包即可,这样src下的复选框会变成灰色。

如右图,选中第一个复选框(导出选中的class文件和资源文件)<!--[if gte vml 1]><v:shape id="_x0000_i1027" type="#_x0000_t75" style='width:295.5pt;height:63.75pt; mso-wrap-style:square;mso-position-horizontal-relative:page; mso-position-vertical-relative:page'> <v:imagedata src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtml1\01\clip_image005.png" o:href="http://hiphotos.baidu.com/zhifeichuan/pic/item/1bbde02e38a3016c1e3089a7.jpg"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

如下图可选则导出路径;options"compress the content of the JAR file"为打成jar包的意思;“Add driectory entries"为生成目录

<!--[if gte vml 1]><v:shape id="_x0000_i1028" type="#_x0000_t75" style='width:415.5pt;height:465pt;mso-wrap-style:square; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtml1\01\clip_image007.jpg" o:href="http://hiphotos.baidu.com/zhifeichuan/pic/item/323665d450adf49050da4bbf.jpg"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

3.
单击Finish完成。生成的jar包和解压后的文件如图。因为没有选中properties文件所以properties文件没有打入jar

<!--[if gte vml 1]><v:shape id="_x0000_i1029" type="#_x0000_t75" style='width:360.75pt;height:115.5pt;mso-wrap-style:square; mso-position-horizontal-relative:page;mso-position-vertical-relative:page'> <v:imagedata src="file:///C:\Users\ADMINI~1\AppData\Local\Temp\msohtml1\01\clip_image008.png" o:href="http://hiphotos.baidu.com/zhifeichuan/pic/item/44328937b01350650b55a98c.jpg"/> </v:shape><![endif]--><!--[if !vml]--><!--[endif]-->

 

0
2
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics