This is a standalone sample code that I wrote (actual problem is far more complex), this doesn't work as expected. Been trying too long....
What can I do to make it work???
(1) manifest file (MANIFEST.MF)
=======================
Manifest-Version: 1.0
Created-By: 1.4.0_01-b03 (Sun Microsystems Inc.)
Main-Class: myprojects.readmanifest.ReadManifest
Built-By: manish
Java Code (ReadManifest.java)
==============================
Then I compile this and jar it using following comaand from the directory
which contains the classes and manifest file
>jar -cvfm readmanifest.jar MANIFEST.MF myprojects* Verified that the manifest file contained in jar is the correct manifest
file. And run it as -
>java -jar readmanifest.jar The output I get is -
Starting ReadManifest...
jar:file:/D:/Java/ReadManifest/classes/readmanifest.jar!/myprojects/readmani
fest/ReadManifest.class
{}
null
null
Now what could be the reason???
TIA,
- Manish