runxinzhi.com
首页
百度搜索
netbeans打包成jar
文件页里找到build.xml文件,打开在</project>前 加入以下代码保存之
按 Ctrl+C 复制代码
<target name="package-for-store" depends="jar"> <!-- Change the value of this property to be the name of your JAR, minus the .jar extension. It should not have spaces. <property name="store.jar.name" value="MyJarName"/> --> <property name="store.jar.name" value="SwitchHexAndChinese"/> <!-- don't edit below this line --> <property name="store.dir" value="store"/> <property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/> <echo message="Packaging ${application.title} into a single JAR at ${store.jar}"/> <delete dir="${store.dir}"/> <mkdir dir="${store.dir}"/> <jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip"> <zipgroupfileset dir="dist" includes="*.jar"/> <zipgroupfileset dir="dist/lib" includes="*.jar"/> <manifest> <attribute name="Main-Class" value="${main.class}"/> </manifest> </jar> <zip destfile="${store.jar}"> <zipfileset src="${store.dir}/temp_final.jar" excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/> </zip> <delete file="${store.dir}/temp_final.jar"/> </target>
按 Ctrl+C 复制代码
build.xml右键即可打包生成SwitchHexAndChinese.jar
生成的文件
相关阅读:
Head First HTML与CSS阅读笔记(一)
Redis安装配置及在Python上的应用
PXE+Kickstack实现无人值守安装CentOS 7操作系统(附一台CentOS7实现CentOS6和CentOS7双系统安装)
Linux常用命令之diff使用介绍
渗透测试专业术语
CentOS7之SVN服务配置
Linux下面误删除文件使用extundelete工具恢复介绍
Linux单元测试题一
Linux下面MariaDB 管理命令基础使用
Linux中/etc下面passwd和shadow文件介绍
原文地址:https://www.cnblogs.com/zhaocundang/p/5041049.html
最新文章
小甲鱼零基础汇编语言学习笔记第四章之第一个汇编程序
小甲鱼零基础汇编语言学习笔记第三章之寄存器(内存访问)
监视磁盘使用情况的Shell脚本(本地+远程)
腾讯最赚钱的部门是怎么做运维的?
【重磅】运维自动化的最佳实践探索
几个常用的Linux操作系统监控脚本
Linux服务器上监控网络带宽的18个常用命令
25个Linux性能监控工具
13款Linux运维比较实用的工具
Linux监控体系
热门文章
Linux/hp unix/AIX日常巡检脚本(转)
linux日常巡检脚本
MySQL设计规范与性能优化
网站架构之性能优化
网站架构之架构演化
Python常见编程规范总结
Sonar服务器搭建
JIRA Plugin Development——Configurable Custom Field Plugin
Python基础总结与实践
Head First HTML与CSS阅读笔记(二)
Copyright © 2020-2023
润新知