Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-07-2007, 08:44 PM
Member
 
Join Date: May 2007
Posts: 39
Alan is on a distinguished road
Jar Files
Hello everybody
I am working with JBuilder 2005 and I need to generate an jar executable from my application. I have been searched and I've found that I have to create a main.mf file and the content of the file must be:

Main-class: classMain

after that in command line I have to do this:


“C:\filesprogram\Java\jdk1.5.0_06\bin\jar” cvfm file.jar Main.mf *.class

It work, it creates me a jar file, but when I execute in my application:


Failed to load Main-Class manifest attribue from
application rout

I dont know why, do you know?
I hope so!
thank you
alan

Last edited by Alan : 06-01-2007 at 02:39 AM.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 05-07-2007, 11:14 PM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
First, open that jar file with winzip/winrar and see if manifest file is there. Then check your main class (The class which has the "static main" method). You should write it with its package name. So if it is class X in Y package, you should write "Y.X" in your manifest file as the Main-Class.

Read the tutorial below for more information:

Setting an Application's Entry Point (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 05-10-2007, 05:22 PM
Member
 
Join Date: May 2007
Posts: 38
Marty is on a distinguished road
First the file is manifest.mf
This file must content the following line


Main-Class: MyPackage.MyClass

Setting an Application's Entry Point (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files)
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 07-29-2007, 12:28 AM
Member
 
Join Date: Jul 2007
Posts: 23
marco is on a distinguished road
now what about applets?
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 07-29-2007, 12:50 AM
Senior Member
 
Join Date: Dec 2006
Posts: 748
levent is on a distinguished road
Quote:
now what about applets?
If your applet is inside a JAR file, you just need to point to the JAR file from your html file.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to files within jar files erhart Advanced Java 0 02-04-2008 03:50 AM
Text and image files within jar files erhart Advanced Java 8 01-19-2008 05:43 AM
how to convert mpeg files to .wav files christina New To Java 1 08-06-2007 05:14 AM
convert xls files into pdf files bbq New To Java 3 07-20-2007 04:56 AM
War Files thauber New To Java 0 07-16-2007 07:57 PM


All times are GMT +3. The time now is 03:01 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org