Problem in Creating jar file for EJB
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sonali_sharma
Posted On:   Thursday, May 6, 2004 07:21 AM

I am trying to create a jar file containing EJB Home,EJB remote,EJB bean,client files and deployment descriptor.My EJB Home,remote and bean classes are in C:EJB and my client classes and deployment descriptor are in C:EJBClient.These folder contains both java and classs files.Now to jar these files I am issuing following command : C:>jar cfm test.jar EJB*.java EJBClient*.java EJBejb-jar.xml then it gives following error: java.io.IOException:invalid header field at java.util.jar.Attributes.read(Attributes.java:383) at java.util.jar.Manifest.read(Manifest.java:167) at java.util.jar.Manifest. (Manifest.java:52) at sun.tools.jar.Main.run.(Main.java:124) at sun.tools.jar.Main.run.(Main.   More>>

I am trying to create a jar file containing EJB Home,EJB remote,EJB bean,client files and deployment descriptor.My EJB Home,remote and bean classes are in C:EJB and my client classes and deployment descriptor are in C:EJBClient.These folder contains both java and classs files.Now to jar these files I am issuing following command :

C:>jar cfm test.jar EJB*.java EJBClient*.java EJBejb-jar.xml

then it gives following error:

java.io.IOException:invalid header field
at java.util.jar.Attributes.read(Attributes.java:383)
at java.util.jar.Manifest.read(Manifest.java:167)
at java.util.jar.Manifest. (Manifest.java:52)
at sun.tools.jar.Main.run.(Main.java:124)
at sun.tools.jar.Main.run.(Main.java:904)

Please tell me whats wrong with the syntax.

   <<Less

Re: Problem in Creating jar file for EJB

Posted By:   narender_reddy  
Posted On:   Saturday, June 19, 2004 03:20 AM

y dont u try jar -cfv

Re: Problem in Creating jar file for EJB

Posted By:   Sean_Owen  
Posted On:   Thursday, May 6, 2004 11:43 AM

When using the "m" option, you must specify a manifest file right after the .jar file. That is, you should create a manifest file -- say, MANIFEST.MF, and then type "jar cfm test.jar MANIFEST.MF ...". Type "jar -?" to see a help message explaining the syntax.
About | Sitemap | Contact