五子棋程序之从搭工程到生成可执行的jar文件
----
一、搭建工程
1. 搭建工程chess,类型为java Enterprise 6
2. 在工程的根目录下创建resource文件夹,Mark Directory as->Resource ROOT
3. 在工程的根目录下创建lib文件夹
4. 导入资源文件到resource文件夹下
5. 导入jar文件到lib文件夹下,add as library
二、生成Artifact(编译成可执行Jar)
1. 在工程上右键-->Open Module Settings-->Artifacts
2. Add -->JAR-->From modules with dependancies
3. 选择Module和Main Class,JAR files from libraries=extract to the target JAR, Directory for META-INF/MANIFEST.MF选为META-INF所在的路径。确定。
4. 回到IDE主界面,在build中选择build artifacts-->chess.jar-->build
build之后即可在out->artifacts下看到可执行jar文件。
三、如果需要exe文件,可以用exe4j软件来将.jar文件转换成.exe文件。