ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Roy" <ravi.a...@gmail.com>
Subject Class-Path not recognised from MANIFEST.MF
Date Thu, 22 May 2008 15:29:00 GMT
Hi All,

My apologies if I am missing something obivious, I have the following
test build.xml, in which I am trying to create a executable JAR, I am
specifying the Class-Path which is needed by the application at
runtime but application reports NoClassDefFound error...

Class-Path and Main-Class attribute are fine the Manifest.MF.. But
looked very strange that is come with NoClassDefFoundError..

Does soembody knows the clue what is wrong ?

Thanks in advance.

Regards,
Ravi.


<project name="Test Executable application" default="main">

<target name="main" depends="manifest.creation">
 <jar destfile="Application.jar" manifest="manifest.mf" update="false">
   <fileset dir="${basedir}">
     <include name="*com/**" />
     <include name="App1.jar" />
   </fileset>
 </jar>
</target>

<target name="manifest.creation">
  <manifest file="MANIFEST.MF">
    <attribute name="Main-Class" value="com.maycompany.test.HelloMain" />
    <attribute name="Class-Path" value="App1.jar" />
  </manifest>
</target>

</project>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message