Results 1 to 6 of 6
Thread: I Can't Create my Jar File
- 02-24-2010, 01:48 PM #1
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
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.
- 02-24-2010, 02:24 PM #2
Member
- Join Date
- Feb 2010
- Posts
- 29
- Rep Power
- 0
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.
- 02-24-2010, 03:39 PM #3
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
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
- 02-24-2010, 03:40 PM #4
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
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
- 02-25-2010, 05:49 AM #5
Member
- Join Date
- Feb 2010
- Posts
- 29
- Rep Power
- 0
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
- 02-25-2010, 12:28 PM #6
Member
- Join Date
- Feb 2010
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
How to create MS Doc file?
By javaforum in forum Advanced JavaReplies: 3Last Post: 02-07-2010, 05:36 PM -
Create .jar file
By cestmoiwikies in forum New To JavaReplies: 2Last Post: 09-06-2009, 08:16 AM -
How to create .exe file using .class file
By pradnya in forum New To JavaReplies: 8Last Post: 04-18-2009, 12:50 AM -
how to create jar file ???
By doha786 in forum New To JavaReplies: 2Last Post: 04-13-2009, 07:50 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks