ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henning Bredel <h.bre...@gmx.de>
Subject Re: unable to execute JAR file
Date Wed, 18 Jun 2008 08:04:22 GMT
On Wednesday 18 June 2008 09:25:42 Irfan.Sayed@t-systems.com wrote:
> Hi All,
>
>
>
> I have 10 java files and I have written Ant build.xml to compile and
> create JAR file which contains the .class files. Now my requirement is
> that I need to execute/install the JAR file but unfortunately I can't do
> this as I am getting following error.
>
>
>
> D:\Irfan\Manvendra Singh java code\Manvendra Singh java code>java -jar
> test.jar
>
> Failed to load Main-Class manifest attribute from
>
> test.jar
>
>
>
> D:\Irfan\Manvendra Singh java code\Manvendra Singh java code>
>
>


You have to define your main class within the meta description of 
your jar file.

see

http://ant.apache.org/manual/CoreTasks/jar.html

BTW: It must be *.classes instead of *.classess in your build.xml

Regards

  Henning



Mime
View raw message