I have created small java application in eclipse. Everything is working fine when I am creating runnable jar from IDE. but somehow I am not able to create it via terminal (fyi I am using Mac).

Following is my project directory structure

```
./bin (Contains all compiled classes)
./lib (Contains all the third party lib I am using lib1.jar,lib2.jr, lib3.jar)
./src (Contains my java class = myProject.java)
manifest.txt (Contains 2 line, first line is Main-Class:myProject and second line is empty)

```

Following is the command that I used for compiling my classes

```
javac -d bin -sourcepath src -cp lib/lib1.jar:lib/lib2.jar:lib/lib3.jar src/myProject.java

```

To create jar file I am using following command

```
jar cvfm myProject.jar manifest.txt bin/*.class lib/*.jar

```

When I run this command I am getting invalid header field. Following is complete error message.

```
java.io.IOException: invalid header field
    at java.util.jar.Attributes.read(Attributes.java:393)
    at java.util.jar.Manifest.read(Manifest.java:180)
    at java.util.jar.Manifest.<init>(Manifest.java:50)
    at sun.tools.jar.Main.run(Main.java:149)
    at sun.tools.jar.Main.main(Main.java:1147)

```

I am not sure where I am going wrong. Can anyone point what mistake I am making or whether do I need to some more stuff ?

Thanks in advance.