How to create Manifest and how to add Class-path: <jar containing custom class> into it??

Posted on 2006-04-18
Last Modified: 2010-04-01
How to put the jar in my WAR manifest - classpath. This is to say that my war uses the class files in the jar.

In the WAR Manifest.MF

Class-path: <jar containing custom class>

How to create Manifest and how to add Class-path: <jar containing custom class> into it??

Question by:chaitu chaitu
    LVL 23

    Expert Comment

    LVL 20

    Author Comment

    by:chaitu chaitu
    this is war task to create war in build.xml

    <war destfile="${name}.war"    webxml="${web.dir}/WEB-INF/web.xml">    
    <fileset dir="${web.dir}">            
    <include name="**/*.*"/>        

    in that task how can i add to create MANIFEST file.
    LVL 20

    Author Comment

    by:chaitu chaitu
    i think while creating jar only it create MANIFEST file automatically
    LVL 3

    Accepted Solution

    Hi chaituu,
    There would be somethin like this:

    <jar destfile="my.jar">
                            <attribute name="Project" value="Project"/>
                            <attribute name="Built-By" value="EE"/>
                            <attribute name="Built-On" value="${TODAY}"/>

    You could try something similar

    LVL 3

    Expert Comment

    see the manifest task at:

    use  in my previous example add the following:
    <attribute name="Class-Path" value="...."/>


    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    This post first appeared at Oracleinaction  ( Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
    In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now