JAR Won't Archive Properly (Invalid Header Field Name)
So, I think I've followed the instructions of how to assemble a Jar archive pretty well. I've placed all the necessary .class files in a folder along with a manifest file (mainClass.txt) which is encoded in UTF-8 and has a carriage return at the end of it's only line:
For some reason though, when I run JAR on it however I get this error:
It looks like there are some junk, non-printing characters before the Main-Class header in my manifest file but I can't find a way to remove them or figure out how to fix this problem. Really need some help with this one guys.
c:\Sun\SDK\jdk\bin>jar cmf C:\Users\Dave\workspace\XMLLoader\bin\mainClass.txt X
java.io.IOException: invalid header field name: ∩╗┐Main-Class