<rdf:RDF
    xmlns:s='http://snipsnap.org/rdf/snip-schema#'
    xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'
    xml:base='http://wiki.marandcustomsolutions.com/rdf'>
    <s:Snip rdf:about='http://wiki.marandcustomsolutions.com/rdf#Development/Java+%26+J2EE/Manifest'
         s:cUser='mpecher'
         s:oUser=''
         s:mUser='mpecher'>
        <s:name>Development/Java &amp; J2EE/Manifest</s:name>
        <s:content>1 Manifest file Basics&#xD;&#xA;Sun has some good info on the Manifest file for a jar:&#xD;&#xA;http://java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html\\&#xD;&#xA;When you create a JAR file, it automatically receives a default manifest file. There can be only one manifest file in an archive, and it always has the pathname&#xD;&#xA;{code}&#xD;&#xA;META-INF/MANIFEST.MF&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1 Known issues&#xD;&#xA;~~Warning:~~ The text file from which you are creating the manifest must end with a new line or carriage return. The last line will not be parsed properly if it does not end with a new line or carriage return.&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1 Application&apos;s Entry Point&#xD;&#xA;If you have an application bundled in a JAR file, you need some way to indicate which class within the JAR file is your application&apos;s entry point. You provide this information with the Main-Class header in the manifest, which has the general form:&#xD;&#xA;{code}&#xD;&#xA;Main-Class: classname&#xD;&#xA;eg: Main-Class: MyPackage.MyClass&#xD;&#xA;{code}&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;1 Seeting Classpath in a Jar&#xD;&#xA;You may need to reference classes in other JAR files from within a JAR file.\\&#xD;&#xA;You specify classes to include in the Class-Path header field in the manifest file. The Class-Path header takes the following form:&#xD;&#xA;{code}&#xD;&#xA;Class-Path: jar1-name jar2-name directory-name/jar3-name&#xD;&#xA;{code}&#xD;&#xA;By using the Class-Path header in the manifest, you can avoid having to specify a long -classpath flag when invoking Java to run the your application.&#xD;&#xA;&amp;nbsp;&amp;nbsp;~~__Note:__ The Class-Path header points to classes or JAR files on the local file system, not JAR files within the JAR file or classes on the network. To load classes in JAR files within a JAR file into the class path, you must write custom code to load those classes. For example, if MyJar.jar contains another JAR file called MyUtils.jar, you cannot use the Class-Path header in MyJar.jar&apos;s manifest to load classes in MyUtils.jar into the class path.~~&#xD;&#xA;&#xD;&#xA;We want to load classes in MyUtils.jar into the class path for use in MyJar.jar.&#xD;&#xA;These two JAR files are in the same directory.&#xD;&#xA;{code}&#xD;&#xA;  Manifest-Version: 1.0&#xD;&#xA;  Class-Path: MyUtils.jar&#xD;&#xA;  Created-By: 1.5.0_01 (Sun Microsystems Inc.)&#xD;&#xA;{code}&#xD;&#xA;The classes in MyUtils.jar are now loaded into the class path when you run MyJar.jar.&#xD;&#xA;&#xD;&#xA;1 Specification&#xD;&#xA;A specification (of the manifest format is part of the on-line JDK documentation at http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest</s:content>
        <s:mTime>2006-02-21 13:06:15.0</s:mTime>
        <s:cTime>2006-02-21 12:51:28.0</s:cTime>
        <s:comments
             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
        <s:snipLinks>
            <rdf:Bag>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE'/>
                <rdf:li rdf:resource='#snipsnap-index'/>
                <rdf:li>
                    <s:Snip rdf:about='http://wiki.marandcustomsolutions.com/rdf#Development/Java+%26+J2EE/Manifest'>
                        <s:attachments
                             rdf:type='http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag'/>
                    </s:Snip>
                </rdf:li>
                <rdf:li rdf:resource='#snipsnap-search'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java+%26+J2EE/Manifest/'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Manually Deleting a Windows Service'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java+&amp;+J2EE/Manifest'/>
                <rdf:li rdf:resource='#Development'/>
                <rdf:li rdf:resource='http://wiki.marandcustomsolutions.com/rdf#Development/Java &amp; J2EE/Hibernate'/>
            </rdf:Bag>
        </s:snipLinks>
    </s:Snip>
</rdf:RDF>

