Help with manifest.txt and .jar

I have two class files I'm trying to create a .jar file for:

InventoryMain.class (houses my main)

Inventory.class

Both files are in package inventorymain

Here is everything I have tried in my manifest.txt file:

Manifest-Version: 1.0

Main-Class: inventorymain.InventoryMain (1st try)

Main-Class: InventoryMain (2nd try)

Main-Class: inventorymain (third try)

I use the following in command prompt:

jar cvfm Inventory.jar manifest.txt *.class (this runs and says all 3 files are included)

then when I try to run Inventory.jar I get the following error:

A window pops up labeled Java Virtual Machine Launcher with the error of "could not find the main class. Program will exit.

Anyone know what I am doing wrong? I am a student, and this is the first program I have created that uses more than one file. I have been all over the Internet to look for things I can do. I am stumped!! Anyhelp would be appreciated. Here is the beginning of my main program, if it will help someone help me.

package inventorymain;

import java.io.IOException;

import java.io.InputStreamReader;

import java.io.BufferedReader;

publicclass InventoryMain

{

// Creates a new instance of InventoryMain

public InventoryMain()

{

}

// main method begins execution of java application

publicstaticvoid main(String[] args)

{

[1955 byte] By [javahelp44a] at [2007-11-27 7:35:05]
# 1
Your first try with the manifest was correct. But you didn't put the class files into the jar correctly. You put your InventoryMain.class file into the root directory of the jar, but since it's in the inventorymain package, it should be in an inventorymain directory in the jar.
DrClapa at 2007-7-12 19:15:36 > top of Java-index,Java Essentials,Java Programming...
# 2

This line should work:

Main-Class: inventorymain.InventoryMain

but what may be tripping you up if you are writing this manifest yourself is that if this is the last line in the file, it must end with a newline. (Don't ask, it's a UNIX thang.) I usually throw in a couple blank lines at the end of the manifest for good measure. Try that and let us know how it that fixes it.

Hippolytea at 2007-7-12 19:15:36 > top of Java-index,Java Essentials,Java Programming...
# 3
ok, Thank you very much DrClap!! Now I will try to learn to do that.
javahelp44a at 2007-7-12 19:15:36 > top of Java-index,Java Essentials,Java Programming...
# 4
Hippolyte;Thanks for your advice. I am creating manifest.txt in notepad. I do hit the enter button a few times after putting in my data then save. If this is what your suggesting, I have done this and still get the error. I am going to try DrClaps advice for the moment. Thank you!
javahelp44a at 2007-7-12 19:15:36 > top of Java-index,Java Essentials,Java Programming...