Executable Jars- Error: Main Class not found

I am pretty new to java and I cant seem to get my jar file to execute when I double click it. It gives an error that reads "Could not find the main class" and I'm not sure where the problem resides. My manifest file reads

Main-Class: Calculator

Which, of course, is my main class. I get the same sort of error when I type "java -jar Calculator.jar" (which is the jar file I have created) at the dos prompt. In jbuilder the program runs fine and if I type java packagename.classname at the dos promt the program runs fine. Can anybody help me here?

[575 byte] By [jschick1] at [2007-9-26 1:36:52]
# 1

You mention that you run the program from the dos prompt with java packagename.classname. Your entry in the manifest should also reflect the package, hence:

Manifest-Version: 1.0

Main-Class: packagename.Calculator

Make sure the package structure is also reflected in the files in the jar (i.e. the path for each class file is included)

HTH,

Neil.

neilr3 at 2007-6-29 2:22:56 > top of Java-index,Desktop,Deploying...