ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashant Reddy <prash...@pramati.com>
Subject Re: unable to execute JAR file
Date Wed, 18 Jun 2008 08:23:56 GMT
Google is your friend.

http://www.google.co.in/search?q=Failed+to+load+Main-Class+manifest+attribute

The first hit from the search result has this link to Java tutorial :
http://java.sun.com/docs/books/tutorial/deployment/jar/basicsindex.html

To execute a jar using 'java' command, the JAR file needs to have a 
MANIFEST.MF file with entry 'Main-Class'.

The value of this entry must be the fully qualified class name which has 
the main() function.

-Prashant

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>
>
> Please find the attached java code and build script.
>
> Please help
>
> Regards
>
> Irfan.
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> 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