Results 1 to 6 of 6

Thread: Jar Files

  1. #1
    Alan is offline Member
    Join Date
    May 2007
    Posts
    39
    Rep Power
    0

    Default 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 01:39 AM.

  2. #2
    levent Guest

    Default

    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)

  3. #3
    Marty is offline Member
    Join Date
    May 2007
    Posts
    38
    Rep Power
    0

    Default

    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)

  4. #4
    marco is offline Member
    Join Date
    Jul 2007
    Posts
    23
    Rep Power
    0

    Default

    now what about applets?

  5. #5
    levent Guest

    Default

    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.

  6. #6
    Webuser is offline Senior Member
    Join Date
    Dec 2008
    Posts
    526
    Rep Power
    0

    Default

    Just use JB Wizards Archive Builder. I am not sure of the v.5 but v.8 has it :)

Similar Threads

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •