Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / March 2008

Tip: Looking for answers? Try searching our database.

Writing Manifest file for jar

Thread view: 
ram - 19 Feb 2008 18:30 GMT
Hi,

    I have a project which i wanted to jar it. I wanted to make a jar
file of all the files inside the project. My problem is i have no main
class in the project as it is directly invoked by eclipse when it is
run. I tried creating jar using the eclipse IDE but it gives the error
as no main class found. When i searched over the forums the answer i
got is give jar the manifest file specifying the main class of the
project. But my main class doensnt have public static void main
method.Is the jar file searching for something like this?If not then
please let me know how could i build a jar for my project.

Thanks & Regards,
Ram
Knute Johnson - 19 Feb 2008 18:53 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> Thanks & Regards,
> Ram

Just create a main() method and use that as the entry point.  Is this a
Swing application?  Remember that you need to create the GUI on the EDT.
 If you are using 1.6 you can specify an entry point with the jar
program.  If you have other required jars then they need to be listed in
the manifest classpath.

Signature

Knute Johnson
email s/nospam/knute/

     ------->>>>>>http://www.NewsDem

Lew - 20 Feb 2008 02:14 GMT
> If you have other required jars then they need to be listed in
> the manifest classpath.

Bearing in mind:
> Note : The Class-Path header points to classes or JAR files on the local network,
> not JAR files within the JAR file or classes accessible over internet protocols.
<http://java.sun.com/docs/books/tutorial/deployment/jar/downman.html>

See also:
<http://java.sun.com/javase/6/docs/technotes/tools/solaris/jar.html>
<http://java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html>

Signature

Lew

Roedy Green - 19 Feb 2008 19:05 GMT
>If not then
>please let me know how could i build a jar for my project.

you can use Jar.exe see http://mindprod.com/jgloss/jarexe.html
or your can use the jar classes and do in programmatically.
See http://mindprod.com/jgloss/jar.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Roedy Green - 05 Mar 2008 08:30 GMT
On Tue, 19 Feb 2008 19:05:02 GMT, Roedy Green
<see_website@mindprod.com.invalid> wrote, quoted or indirectly quoted
someone who said :

>you can use Jar.exe see http://mindprod.com/jgloss/jarexe.html
>or your can use the jar classes and do in programmatically.
>See http://mindprod.com/jgloss/jar.html

or you can use ant.

See http://mindprod.com/jgloss/ant.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.