This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I am right now developing a java application that is compressed as jar. The application uses a postgresql jar and log4j jar, then as the sun tutorial mention I write in the manifest file the classpath attribute. I use absolute path for each jar and write too the attribute that indicate the main class. Then I generate my jar file and put it in a folder in C called PrinterControl .
There is one peculiarity that you have to take into account with regard to the manifest file in a JAR: It must end with a blank line. If there is no blank line at the end of the manifest, then the last line in the manifest will be ignored.
So if you don't have a blank line as the last line in the manifest, then your Main-Class line will be ignored, and it won't work.
It's strange, but that's how it works... See this page in Sun's tutorial for more information.
I don't know why it doesn't work when you specify absolute paths for the JAR files. But doing so is not a good idea, especially if you use a Windows-specific absolute path (beginning with C - it will make your application not work on non-Windows OS'es. [ May 16, 2008: Message edited by: Jesper Young ]