Results 1 to 6 of 6
  1. #1
    Adeyi is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default I Can't Create my Jar File

    I have a package called voiceexpert which contains three classes: Disease, DiagnosingEngine and Symptoms which is a JavaBean. Symptoms makes use of Disease and DiagnosingEngine objects.

    voiceexpert is stored in the directory: c:\diagapp3

    I compiled Symptoms.java as below:
    c:\diagapp3> javac -d . Symptoms.java

    The class files for Disease.java, DiagnosingEngine.java and Symptoms.java are placed in the directory: voiceexpert.

    I created a Manifest.txt file inside c:\diagapp3 containing the following:

    Main-Class:voiceexpert.voiceexpert.Symptoms

    Name:voiceexpert/Symptoms.class

    Java-Bean:True

    I later created the jar file with the command:

    jar cfm jjj.jar Manifest.txt *

    But, I am having the error message: invalid header field

    What can I do to remove this error?

    Note: I created the Manifest.txt using utf-8 encoding. My code is to be used in a third-party application and that is why it does not contain a main method.

  2. #2
    Anjaneyulu is offline Member
    Join Date
    Feb 2010
    Posts
    29
    Rep Power
    0

    Default

    Hi dude!You forget to keep most important & starting header
    "Manifest-Version: 1.0" just keep this as a starting header in your manifest.txt or manifest.mf file.It'll work.

  3. #3
    Adeyi is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default

    I have modified the contents of the manifest file to contai:

    Manifest-Version: 1.0

    Created-By: 1.6.0 (Sun Microsystems Inc.)

    Name: voiceexpert/Symptoms.class

    Java-Bean: True

    Yet, it gave the error message:
    invalid header field name: Manifest-Version

    What exactly could be wrong?

    Note: I am using jdk1.6

  4. #4
    Adeyi is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default

    I have modified the contents of the manifest file to contain:

    Manifest-Version: 1.0

    Created-By: 1.6.0 (Sun Microsystems Inc.)

    Name: voiceexpert/Symptoms.class

    Java-Bean: True

    Yet, it gave the error message:
    invalid header field name: Manifest-Version

    What exactly could be wrong?

    Note: I am using jdk1.6

  5. #5
    Anjaneyulu is offline Member
    Join Date
    Feb 2010
    Posts
    29
    Rep Power
    0

    Default

    Hi Adeyi just go through this article you may solve your problem i tried it but i cant get the solution.I'll try again if at all i found the solution i'll let you know.Before this just go through the following article and try urself.
    http://java.sun.com/j2se/1.4.2/docs/...ifest-Overview

  6. #6
    Adeyi is offline Member
    Join Date
    Feb 2010
    Posts
    4
    Rep Power
    0

    Default

    Thank you. I hope someone will be able to bail me out of this logjam.

Similar Threads

  1. How to create MS Doc file?
    By javaforum in forum Advanced Java
    Replies: 3
    Last Post: 02-07-2010, 05:36 PM
  2. Create .jar file
    By cestmoiwikies in forum New To Java
    Replies: 2
    Last Post: 09-06-2009, 08:16 AM
  3. How to create .exe file using .class file
    By pradnya in forum New To Java
    Replies: 8
    Last Post: 04-18-2009, 12:50 AM
  4. how to create jar file ???
    By doha786 in forum New To Java
    Replies: 2
    Last Post: 04-13-2009, 07:50 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
  •