• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Manifest - JAR file - Exception

 
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created a manifest file for javabean and I am trying to
include it in the jar with the jar option (m), but I am
getting the following Exception. Some one please help me.

D:\vishnu\java\corejava>jar cfm ch.jar c1.mft

java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:387)
at java.util.jar.Manifest.read(Manifest.java:167)
at java.util.jar.Manifest.<init>(Manifest.java:52)
at sun.tools.jar.Main.run(Main.java:124)
at sun.tools.jar.Main.main(Main.java:904)
 
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are a bunch of suggestions if you google on:

invalid header field jar manifest

If that doesn't help why don't you post the contents of your manifest, the exact command you are running and the resulting output.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is my mft file and I had given new line after True.

Name: Check.class
Java-Bean: True


I compiled from the command prompt with this command and I didn't get
any error.

D:\vishnu\java\corejava>jar cfm ch.jar c1.mft Check.class

Now ch.jar, c1.mft, Check.java are all in the same directory

Then I executed the beanbox\run.jar
when I goto File menu and use the LoadJar Option to load the jar file
I get the following error


Jar file D:\vishnu\java\corejava\ch.jar didn't have any beans!

Each jar file needs to contain a manifest file describing which entries are
beans. You can should provide a suitable manifest when you create the jar.
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did you check the manifest in the jar to see what ended up in it?
 
Carol Enderlin
drifter
Posts: 1364
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm curious why you're using "beanbox".

I googled for beanbox tutorial and had a hard time finding the old original beanbox (today I searched for beanbox alone and all the pointers go right to the old beanbox BDK), instead I found the beanbox pointers actually going to Bean Builder. Beanbox has some issues with JDK 1.4: javabeans faq - When I run the BeanBox under J2SE v 1.4 I get an exception. What's going on here?... you mentioned this in a PM.

JavaBeans Beanbox Tutorial (points to sun page to download BDK, but now it looks like that page points to Bean Builder rather than BeanBox.

Sun's JavaBean page - reference to Bean Builder

The Bean Builder: A BeanBox for the new Millennium

Bean Builder Tutorial
 
Poop goes in a willow feeder. Wipe with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic