- 浏览: 462562 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (178)
- linux (25)
- java (31)
- eclipse (3)
- web (19)
- database (11)
- framework (7)
- spring (1)
- jbpm (1)
- error and solution (3)
- struts2 (3)
- hibernate (12)
- other (15)
- ubuntu (2)
- build tools (1)
- 服务器配置 (3)
- extjs (2)
- ssl相关 (1)
- 项目管理 (0)
- 软件测试 (0)
- java maven2 (2)
- Windows Server 2003 (1)
- glassfish (1)
- build tools,maven (2)
- Heritrix3 (1)
最新评论
-
lbs1026:
您好,卸载后怎么再装上去呢?
java中dll文件的加载和卸载。 -
mp19901204:
请教下,能通过js播放指定的影片吗。不刷新网页,用js直接调用 ...
Flv播放器 Vcastr3.0的用法参考 -
wiflish:
hanmiao 写道试了第壹個,好用。
使maven2在下载依赖包的同时下载其源代码包。 -
hanmiao:
试了第壹個,好用。
使maven2在下载依赖包的同时下载其源代码包。 -
chuanwang66:
请问Heritrix 3.1.0 你是怎么配置进Eclipse ...
Heritrix3.1.0RC1使用Cookie不能自动登录问题的一个解决办法
官方链接:JAR File Specification
MANIFEST.MF文件属性:
MANIFEST.MF文件属性:
Main Attributes
Main attributes are the attributes that are present in the main section of the manifest. They fall into the following different groups:- general main attributes
- Manifest-Version:
- Created-By:
- Signature-Version:
- Class-Path :
- attribute defined for stand-alone applications This attribute is used by stand-alone applications that are bundled into executable jar files which can be invoked by the java runtime directly by running "java -jar x.jar".
- Main-Class :
- Defines the manifest file version. The value is a legitimate version
number, as described in the above spec.
Defines the version and the vendor of the java implementation on top of which this manifest file is generated. This attribute is generated by the jar tool.
Defines the signature version of the jar file. The value should be a valid version-number string.
The value of this attribute specifies the relative URLs of the extensions or libraries that this application or extension needs. URLs are separated by one or more spaces. The application or extension class loader uses the value of this attribute to construct its internal search path.
The value of this attribute defines the relative path of the main application class which the launcher will load at startup time. The value must not have the .class extension appended to the class name.
- attributes defined for applets These attributes is used by an applet which is bundled into JAR files to define requirements, version and location information for the extensions which this applet depends on. (see Extension Versioning ).
- Extension-List:
- <extension>-Extension-Name :
- <extension>-Specification-Version
- <extension>-Implementation-Version
- <extension>-Implementation-Vendor-Id
- <extension>-Implementation-URL
- attribute defined for extension identification This attribute is used by extensions to define their unique identity.
- Extension-Name: This attribute specifies a name for the extension contained in the Jar file. The name should be a unique identifier such as the name of the main package comprising the extension.
- attributes defined for extension and package versioning and sealing information These attributes define features of the extension which the JAR file is a part of. The value of these attributes apply to all the packages in the JAR file, but can be overridden by per-entry attributes.
- Implementation-Title : The value is a string that defines the title of the extension implementation.
- Implementation-Version :
- Implementation-Vendor :
- Implementation-Vendor-Id :
- Implementation-URL :
- Specification-Title :
- Specification-Version :
- Specification-Vendor :
This attribute indicates the extensions that are needed by the applet. Each extension listed in this attribute will have a set of additional attributes that the applet uses to specify which version and vendor of the extension it requires.
This attribute is the unique name of the extension. The Java Plug-in will compare the value of this attribute with the Extension-Name attribute in the manifests of installed extensions to determine if the extension is installed.
This attribute specifies the minimum extension specification version that is required by the applet. The Java Plug-in will compare the value of this attribute with the Specification-Version attribute of the installed extension to determine if the extension is up to date.
This attritute specifies the minimum extension implementation version number that is required by the applet. The Java Plug-in will compare the value of this attribute with the Implementation-Version attribute of the installed extension to see if a more recent implementation needs to be downloaded.
This attribute can be used to identify the vendor of an extension implementation if the applet requires an implementation from a specific vendor. The Java Plug-in will compare the value of this attribute with the Implementation-Vendor-Id attribute of the installed extension.
This attribute specifies a URL that can be used to obtain the most recent version of the extension if the required version is not already installed.
The value is a string that defines the version of the extension implementation.
The value is a string that defines the organization that maintains the extension implementation.
The value is a string id that uniquely defines the organization that maintains the extension implementation.
This attribute defines the URL from which the extension implementation can be downloaded from.
The value is a string that defines the title of the extension specification.
The value is a string that defines the version of the extension specification.
The value is a string that defines the organization that maintains the extension specification.
- Sealed :
This attribute defines whether this JAR file is sealed or not. The value can be either "true" or "false", case is ignored. If it is set to "true", then all the packages in the JAR file are defaulted to be sealed, unless they are defined otherwise individually.
发表评论
-
《架构之美》笔记
2013-12-04 21:02 0美丽架构的特性: 1、概念完整性(来自于处理问题的一致性) ... -
【转】生产环境下JAVA进程高CPU占用故障排查
2013-11-01 16:36 1438转自: http://blog.chinaunix.net/ ... -
在maven生成eclipse文件时,使项目支持wtp的方式
2011-12-18 00:37 1241使项目能支持wtp: maven eclipse:ec ... -
解决Maven编译出现警告时,就提示编译失败的问题
2011-08-18 19:42 2106解决Maven编译出现警告时,就提示编译失败的问题 原因:m ... -
进入Glassfish3管理控制台太慢的解决办法
2011-07-07 14:53 1690解决办法:关闭Glassfish的网络链接。 配置方法 ... -
OSGi4.2规范的Bundle Manifest Headers列表
2010-01-22 17:40 2490OSGi4.2规范的Bundle Manifest ... -
VisualVM远程监控
2009-11-18 17:28 2629VisualVM是集成了多个JDK命令工具的一个可视化 ... -
maven-war插件打包war时,过滤掉指定文件或目录的配置方法
2009-09-09 11:53 17149<plugin> <artifac ... -
quartz中的CronTriggers表达式含义
2009-09-08 10:58 1042http://www.opensymphony.com/qua ... -
Spring-Security 2 中从数据库中读取权限的实现方式
2009-07-22 21:29 3558security的配置片段: < ... -
关于Bad version number in .class file错误
2009-04-01 10:54 1105出现Bad version number in .class ... -
maven报错。
2009-03-22 00:07 1641错误信息:[INFO] Required goal not f ... -
java处理视频
2009-01-12 22:42 3875目前绝大多数视频网站使用的格式是flv。格式可以任意位置播放, ... -
Xdoclet的标签及用法
2006-05-11 11:43 880参照链接: Xdoclet的标签及用法 -
原创:eclipse反编译插件Jadclipse介绍
2006-05-16 15:23 907jadclips插件网站:http://jadclipse.s ... -
ant中宏定义例子
2006-05-18 16:47 1602一个ant中用于编译的宏定义例子: 1 ... -
Google Web Toolkit
2006-05-22 14:12 844Google Web Toolkit (GWT) is a J ... -
[转]java基本类装入异常
2006-05-24 16:24 1140原文链接:http://www-128.ibm.co ... -
安装和卸载Mysql的windows系统服务
2006-05-26 15:20 1156安装mysql的windows系统服务: ${mysql.h ... -
通过java获取系统环境变量
2006-07-03 17:11 3670代码如下: 1 public static ...
相关推荐
- MANIFEST文件中的`Main-Class`属性必须正确设置,包括正确的包路径。 - 如果JAR文件中包含其他依赖的库文件(如第三方JAR),也需要一并打包进去或者在运行时通过`-cp`参数指定。 #### 三、总结 JAR文件作为一种...
在构建JAR时,这些依赖可以被包含在最终的JAR文件中,或者通过`Class-Path`属性在manifest文件中引用。 总结,`jar`命令是Java开发中处理类文件和资源的关键工具。了解其用法,能够有效地管理和分发Java应用程序。...
假设你需要将两个 `.class` 文件 `Foo.class` 和 `Bar.class` 打包到一个名为 `classes.jar` 的 JAR 文件中,可以使用以下命令: ``` jar cvf classes.jar Foo.class Bar.class ``` - `c`: 表示创建一个新的 JAR ...
### 制作可执行的JAR文件包及jar命令详解 在Java开发中,将多个类文件、资源文件以及依赖库打包成一个可执行的JAR(Java Archive)文件是常见的需求,尤其对于构建独立运行的应用程序尤为重要。本文将深入探讨如何...
JAR命令是Java开发工具包(JDK)中的一项重要功能,用于创建、管理和操作JAR文件。JAR(Java ARchive)是一种压缩文件格式,类似于ZIP文件,主要用于将多个Java类文件和其他资源打包在一起,便于分发和管理。JAR文件的...
- 如果JAR文件依赖于外部库,需要在MANIFEST文件中通过`Class-Path`属性指定这些库的位置。 - 使用`jar`命令时,需要注意命令参数的顺序和格式,避免出错。 总之,理解JAR文件的工作原理以及如何使用`jar`命令对于...
其中,`cvfm`参数分别代表创建(c)、添加到归档文件(v)、指定manifest文件(f)和manifest文件名。 3. **jar命令详解** - `jar cvf JarName.jar DirectoryOrFiles`:创建一个新的JAR文件,包含指定目录或文件...
创建了 MANIFEST.MF 文件后,将其与 `.class` 文件放在同一目录下,然后在上一级目录执行上面的 `jar` 命令,这样生成的 `test.jar` 就是一个可执行 JAR 文件。在 Windows 上,用户只需安装了 JRE,就可以双击运行该...
### jar命令大全:打包与运行详解 在Java开发中,`jar`命令是处理Java Archive (JAR) 文件的关键工具,用于将多个类文件、资源文件以及清单文件(Manifest)打包成一个单一的JAR文件,便于管理和部署。本文将深入...
Manifest文件中的属性与值之间需以冒号和空格分隔,如`Main-Class: Test`。 ### 四、使用jar命令 使用jar命令可以执行以下操作: - 创建JAR文件:`jar cf jarfilename.jar file1 file2 ...` - 更新JAR文件:`jar ...
### Jar文件包间接及Jar命令开发实例详解 #### 一、引言 在Java开发过程中,经常遇到将Java程序封装成可直接运行的文件的需求。本文将详细介绍如何使用Jar文件包以及Jar命令来实现这一目标,并通过实际示例加深理解...
为了使JAR文件可执行,通常需要在MANIFEST.MF文件中定义`Main-Class`属性,该属性指定了JAR文件的入口类,即程序的主类。 #### Maven插件介绍 为了实现将Maven项目打包成可执行的JAR文件,我们需要使用到Maven的几...
这里`jar`是命令,`cvfm`是选项,`cal.jar`是输出的JAR文件名,`manifest.mf`是Manifest文件,`*.class`表示所有`.class`文件。 4. **选项解释**: - `-c` 创建新的归档文件。 - `-v` 输出详细信息。 - `-f` ...
5. 最后,保存pom.xml文件,然后在命令行或者IDE中执行Maven的打包命令,通常是`mvn clean package`,这将根据pom.xml的配置打包项目,并生成包含主清单属性的jar文件。 注意:如果你的项目不是Spring Boot应用,你...
批处理命令可以包括创建MANIFEST文件和构建JAR的步骤: ``` echo Main-Class: com.mycompany.MyApp > Manifest.txt jar cmf Manifest.txt myapp.jar com/mycompany/*.class ``` 4. **包含依赖**: 如果JAR文件...
jar命令的基本格式为:`jar [选项] [manifest文件] -C 目录名 [文件]` 选项部分为ctxum0M,具体含义如下: - c 创建一个新的JAR文件包 - t 列出JAR文件包中的内容 - x 展开JAR文件包中的指定文件或全部文件 - u ...
对于属性文件,Java可以自动从JAR中加载,例如: ```java ResourceBundle.getBundle("com.abc.test"); ``` 这时,`test.properties`只需放在JAR的`com/abc/`目录下。 3. **JAR工具**:JAR工具位于JDK安装目录...