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: ...
随机推荐
- Go语言标准包之用io包模拟curl
最后一个书上的标准包,但真正学习的路才开始... package main import ( "bytes" "fmt" "os" &quo ...
- 用webpy实现12306余票查询
效果
- [水煮 ASP.NET Web API2 方法论](12-2)管理 OData 路由
问题 如何控制 OData 路由 解决方案 为了注册路由,可以使用 HttpConfigurationExtension 类中 MapODataServiceRoute 的扩展方法.对于单一路由这样 ...
- jQuery文档处理
1.wrap 把所有匹配的元素用其他元素的结构化标记包裹起来.(我的理解就是给匹配的元素穿一件衣服) 把所有的段落用一个新创建的div包裹起来 $("p").wrap(" ...
- HashMap底层数据结构和算法解析
1.Hash Map的数据结构? A:哈希表结构(链表散列:数组+链表)实现,结合数组和链表的优点.当链表长度超过8时,链表转换为红黑树. transient Node<K,V>[] ta ...
- ubuntu14.04下安装爬虫工具scrapy
scrapy是目前准备要学习的爬虫框架,其在ubuntu14.04下的安装过程如下: ubuntu14.04下默认安装了2.7的python以及setuptools,若未安装,可通过下面指令安装: s ...
- Redux 中间件的执行顺序理解
Redux.applyMiddleware(thunk, middleware1) 和 Redux.applyMiddleware(middleware1, thunk) 的区别: <!DOCT ...
- Sd - Java多线程
1. Java中线程有哪些同步的方法? 在Java语言中,每个对象都有一个锁,一个线程可以通过关键字synchronized来申请获取某个对象的锁,关键字synchronized可以被用于方法(粗粒度 ...
- ListView EditText 实现的三种方式
原文网址:http://blog.sina.com.cn/s/blog_682139d001013omd.html 这段时间搞一个android表格,真是搞死人,让我想到iphone开发是何其的简单啊 ...
- html基础知识介绍
1 前端概要 前端三大利器 1.html 赤裸裸的人 2.css 穿上华丽的衣服 3.js 让人生动起来 2 HTML本质及在web程序中的作用 2.1 介绍 HTML 1.一套规则,浏览 ...