ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ravi Roy" <ravi.a...@gmail.com>
Subject Re: Class-Path not recognised from MANIFEST.MF
Date Thu, 22 May 2008 16:03:45 GMT
Thanks Kevin and Dominique for your quick replies,

Yes. Exception is for a class in the App1.jar which is needed by
Application.jar (main application file). What about a application
which needs multiple jar files on its classpath, does all these files
(dependencies) needs to be specified using the -classpath attribute on
command line .. There is no other way ?

Dominique : App1.jar is included in root of Application.jar so it is
physical file itself in the Application.jar ?
Regards,
Ravi

On Thu, May 22, 2008 at 9:20 PM, Toomey, Kevin H (ATS, IT)
<Kevin.Toomey@thehartford.com> wrote:
> Hi Ravi,
>
> I'm assuming the exception is for a class in the App1.jar file.  That's
> because (unfortunately) jar files can't read jar files contained within
> them. You need to place App1.jar on the file system and include it in
> your command to your executable jar file.
>
> Ex. java -classpath App1.jar -jar Application.jar
>
> Thanks,
> Kevin
>
> -----Original Message-----
> From: Ravi Roy [mailto:ravi.aroy@gmail.com]
> Sent: Thursday, May 22, 2008 11:29 AM
> To: Ant Users List
> Subject: Class-Path not recognised from MANIFEST.MF
>
> 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
>
>
>
> *************************************************************************
> This communication, including attachments, is
> for the exclusive use of addressee and may contain proprietary,
> confidential and/or privileged information.  If you are not the intended
> recipient, any use, copying, disclosure, dissemination or distribution is
> strictly prohibited.  If you are not the intended recipient, please notify
> the sender immediately by return e-mail, delete this communication and
> destroy all copies.
> *************************************************************************
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message