views:

120

answers:

1

Hi,i have created exe by luunch4j and build.xml ant file in java but when i click exe i'm get could not find main class program will exit kind of message,even i click on jar file it also giving message as failed to load main class manifest attribute,what is the problem?

Thanks in adavance rajani

A: 

Have you a manifest file ? In your manifest file, you give the entry point (class) where the main(String[] args) method is.

More detail : http://java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html

Here a example :

Manifest-Version: 1.0
Sealed: true

Main-Class: org.example.server.Lauch

Class-Path: lib\externalLib.jar
Nettogrof
hey where the manifest file will be saved?
I usually save it at the root of the project.The manifest is added to the jar, maybe you'll need to check/modify your build.xml
Nettogrof