Hi Irfan,
 
You need a manifest file with a main class attribute.
 
A quick googling of 'jar main-class' brings back a wealth of links to
check out. Here's one:
http://java.sun.com/developer/Books/javaprogramming/JAR/basics/run.html
 
Thanks,
Kevin

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 18, 2008 3:26 AM
To: user@ant.apache.org
Subject: unable to execute JAR file



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.

 



*************************************************************************
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.
*************************************************************************

Reply via email to