export a java project to runable jar
When a java project needs to be transfered to another machine, e.g. vps, we need to export it to a runable jar and then run it directly on a new machine.
right click project in eclipse, and export to a runable jar. Choose the second Library handling option and set the entry point with a class including main function. After that, we got a jar file and make sure the libraries are declared in MANIFEST.MF file. Then we need to create a empty folder and copy this jar file along with other resource files (e.g. figures, configuration files) into the folder. Now, we can copy this folder to other machine, and run it with the command: java -jar project.jar.
PS: it is said that if there is no other jar file in the project, then we choose export the java project to a jar. Otherwise, we choose export the java project a runable jar (the library information will be automatically generated in MANIFEST.MF).
export a java project to runable jar的更多相关文章
- 将java project打包成jar包,web project 打包成war包的几种演示 此博文包含图片
转: http://blog.csdn.net/christine_ruan/article/details/7491559 http://developer.51cto.com/art/200907 ...
- 将java project打包成jar包,web project 打包成war包的几种演示
将java项目打包成jar 第一种:MyEclipse将java项目打包成jar. 1,右击项目,选择export . 2,点击Java,选择JAR file . 3,在JAR file文本中浏览打包 ...
- java project打包生成jar包(通用)
1. 在工程目录下新建一个build.xml文件,如下图所示,注意必须是在工程目录下,而不是在工程目录的src目录里. 2.编写ant脚本,内容如下,jar文件名称(com.anllin.rup.bo ...
- java项目(java project)如何导入jar包的解决方案列表
右键项目-properties-java build path(左侧菜单)-选择libraries 有两种方式,导入jar包实际上就是建立一种链接,并不是copy式的导入 一.导入外部包,add ex ...
- eclipse项目(java project)如何导入jar包的解决方案列表?
右键项目-properties-java build path(左侧菜单)-选择libraries 有两种方式,导入jar包实际上就是建立一种链接,并不是copy式的导入 一.导入外部包,add ex ...
- 将java项目打包为jar
打开Eclipse,点击file,选择export 选择java,选择其中的JAR file并点击next 选择需要的到处的项目,并在下方输入将项目保存为的目录,文件名字. 如果,已经将项目打包为一个 ...
- Eclipse集成Maven环境(出现jar的解析或者缺失问题)(或者出现Invalid classpath publish/export dependency /common. Project entries not supported)的统一整理
在正确配置完Maven,和Maven IntegrationFor Eclipse之后,新建了一个Maven Project 和一个Maven Module,发现新建的Module项目下的pom.xm ...
- java代码打包成jar以及转换为exe
教你如何把java代码打包成jar文件以及转换为exe可执行文件 1.背景: 学习java时,教材中关于如题问题,只有一小节说明,而且要自己写麻烦的配置文件,最终结果却只能转换为jar文件.实在是心有 ...
- Eclipse将引用了第三方jar包的Java项目打包成jar文件的两种方法
方案一:用Eclipse自带的Export功能 步骤1:准备主清单文件 “MANIFEST.MF”, 由于是打包引用了第三方jar包的Java项目,故需要自定义配置文件MANIFEST.MF,在该项目 ...
随机推荐
- 改造laravel的登录流程,仅使用一个token登录laravel
背景:最近使用lavavel来改造目前的系统,但是之前的老系统还不能立马下线,这时就出现了双系统共存的状态,需要解决的一个问题就是一次登录2个系统. 第一步 修改中间件App\Http\Middlew ...
- C#日常总结
if (!string.IsNullOrEmpty(userid)) { InitPage(); } IsNullOrEmpty 同时测试String是否为nullNothingnullptrnull ...
- 关于Application.Lock和Lock(obj) 转 http://www.cnblogs.com/yeagen/archive/2012/03/01/2375610.html
关于Application.Lock和Lock(obj) Posted on 2012-03-01 15:28 billpeng 阅读(3498) 评论(3) 编辑 收藏 1.Application. ...
- Brew安装MacVim
brew install macvim --with-cscope --with-lua --with-python cscope lua python支持 附一些简单的brew命令 查看brew的帮 ...
- JS与树本(复杂)
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>树形 ...
- 关于SAX
某天,看到一些资料. 发现输入文件是一个使用SAX技术存储的文件格式. 于是在网上找了不少资料 ; 感慨计算机的世界真的是太有趣了. 在此做个简单的介绍. 时间序列数据挖掘是利用数据挖掘技术对一组与 ...
- eclipse svn提交报错
修改文件格式:右键-properties-text file encoding-other UTF-8
- MyBatis总结(一)
一.创建测试项目工程 二.导包(一个myBatis所需的包,以及一个数据库操作的包) 三.创建实体类 四.配置文件的建立(最佳命名为(SqlMapConfig.xml)) <?xml versi ...
- 很重要的vue的生命周期
- CSS3学习之分享下transition属性
最近在网上看到很多transition写的效果,借鉴http://www.w3school.com.cn分享下代码, 1.语法:transition: property duration timing ...