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

Posted on 2006-04-18
Medium Priority
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
  • 2
  • 2
LVL 20

Author Comment

by:chaitu chaitu
ID: 16477311
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
ID: 16477315
i think while creating jar only it create MANIFEST file automatically

Accepted Solution

el_dios earned 2000 total points
ID: 16478691
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


Expert Comment

ID: 16478767
see the manifest task at:


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


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I came across an unsolved Outlook issue and here is my solution.
Most folks would know the basics of how Dropbox works, so that’s not the purpose of this article. Security is what it’s all about, so here I’ll share how I choose to secure my Dropbox Account and the Data it contains.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

840 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