why I can't run jar successfully?
I'm reading <the java tutorial>.
I create a file named SimpleBean.java :
---------------------------------------------------------------
package sunw.demo.simple;
import java.awt.*;
import java.io.Serializable;
public class SimpleBean extends Canvas implements Serializable{
private Color color = Color.green;
public Color getColor(){
return color;
}
public void setColor(Color newColor){
color = newColor;
repaint();
}
public void paint(Graphics g) {
g.setColor(color);
g.fillRect(20, 5, 20, 30);
}
public SimpleBean(){
setSize(60,40);
setBackground(Color.red);
}
}
--------------------------------------------------------
and a file named manifest.tmp :
--------------------------------------------------------
Name:SimpleBean.class
Java-Bean:True
--------------------------------------------------------
and javac SimpleBean.java successfully.
but when i run the command:
jar cfm SimpleBean.jar manifest.tmp SimpleBean.class
i get an error like this:
java.io.IOException: invalid header field
at java.util.jar.Attributes.read(Attributes.java:353)
at java.util.jar.Manifest.read(Manifest.java:159)
at java.util.jar.Manifest.<init>(Manifest.java:59)
at sun.tools.jar.Main.run(Main.java:124)
at sun.tools.jar.Main.main(Main.java:778)
sos,please help me