How to make an executable jar file?
https://stackoverflow.com/questions/5258159/how-to-make-an-executable-jar-file

文件的路径如下:

package com.tellidea;
public class Temp{
public static void main(String args[]){
System.out.println(args[0]);
}
}

直接vim myjar.jar 打开jar包,查看里面的内容:

MANIFEST.MF文件的内容:

---------------------------------------------------------------
Here it is in one line:
jar cvfe myjar.jar package.MainClass *.class
where MainClass is the class with your main method, and package is MainClass's package.
Note you have to compile your .java files to .class files before doing this.
How to make an executable jar file?的更多相关文章
- Spring Boot Executable jar/war 原理
spring boot executable jar/war spring boot里其实不仅可以直接以 java -jar demo.jar的方式启动,还可以把jar/war变为一个可以执行的脚本来 ...
- eclipse 中的 jar file 和 runnable jar file的区别
转自于:http://blog.csdn.net/lijiecong/article/details/6266234 java最难学的就是角落的东东了,不愧叫做java平台.搜索了一把总算明白了. 直 ...
- eclipse下提交job时报错mapred.JobClient: No job jar file set. User classes may not be found.
错误信息: 11/10/14 13:52:07 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. A ...
- 现网环境业务不影响,但是tomcat启动一直有error日志,ERROR org.apache.catalina.startup.ContextConfig- Unable to process Jar entry [module-info.class] from Jar [jar:file:/home/iufs/apache-tomcat/webapps/iufs/WEB-INF/lib/asm
完整的错误日志信息: 2019-03-19 15:30:42,021 [main] INFO org.apache.catalina.core.StandardEngine- Starting Ser ...
- eclipse 运行 mapreduce程序报错 No job jar file set. User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
报错信息 17/07/06 17:00:27 WARN mapred.JobClient: Use GenericOptionsParser for parsing the arguments. Ap ...
- An SPI class of type org.apache.lucene.codecs.PostingsFormat with name 'Lucene50' does not exist. You need to add the corresponding JAR file supporting this SPI to your classpath. The current classp
背景介绍: 当ES中guava库与hive等组件的库冲突时,对Elasticsearch库进行shade,relocate解决库冲突问题. 当使用"org.apache.maven.plug ...
- org.apache.jasper.JasperException:Unable to read TLD "META-INF/c-1_0-rt.tld" from JAR file jstl-1.2.jar
前两天把项目从eclipse EE版搬到MyEclipse中了.配置好jdk,确定build path中没有报错后,在tomcat中运行.结果,报错: org.apache.jasper.Jasper ...
- Eclipse------使用Debug As时报错java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file:/XXX
报错信息: java.lang.IllegalStateException: Failed to read Class-Path attribute from manifest of jar file ...
- Unable to read TLD "META-INF/c.tld" from JAR file
Unable to read TLD "META-INF/c.tld" from JAR file CreationTime--2018年7月18日17点46分 Author: ...
随机推荐
- 在k8s 1.7.0上启用dashboard的注意事项
因为自k8s 1.6之后,有基于角色的安全性. 所以很多网上以前的教程就不能使用了. 结合以下三个文档,暂时实现了dashboard界面的推出. http://blog.csdn.net/jinzil ...
- jquery.form.js上传文件ie弹出下载文件解决办法
在ie下如果返回类型为jsonresult,ie老版本无法识别json类型,默认将会采用下载或者打开文件! 如果使用mvc的话.直接修改action返回类型为string即可,例如:return Js ...
- CentOS为中文显示
[sudo yum groupinstall chinese-support]命令即可安装
- Aras Innovator 11 sp2 IE客户端设置
在上一篇文章<Aras Innovator 11 sp2 安装>后,服务器算是安装好了,还需要在使用的客户端进行设置才可以正常使用Aras Innovator 该篇为IE设置,还有< ...
- mocha测试es6问题
平时在写完正常的逻辑代码后,需要使用单元测试去测试逻辑代码,现在比较流行的是使用mocha进行测试 现在都是使用es6的写法,如果直接使用mocha test\某个文件,会出现下面的错误,原因是因为m ...
- SQL注入工具实践
程序简介 超级SQL注入工具(SSQLInjection)是一款基于HTTP协议自组包的SQL注入工具,支持出现在HTTP协议任意位置的SQL注入,支持各种类型的SQL注入,支持HTTPS模式注入. ...
- Java工具类-加密算法
import java.io.UnsupportedEncodingException; import java.security.MessageDigest; import java.securit ...
- 洛谷P2127 序列排序 [贪心]
题目传送门 题目描述 小C有一个N个数的整数序列,这个序列的中的数两两不同.小C每次可以交换序列中的任意两个数,代价为这两个数之和.小C希望将整个序列升序排序,问小C需要的最小代价是多少? 输入输出格 ...
- Cobol online program 传指针
- Android apk去广告
韩梦飞沙 yue31313 韩亚飞 han_meng_fei_sha 313134555@qq.com 下载地址: [北方网通] [电信网通] [下载说明] 1 点击上面的地址,打开下载页面 ...
