« July 2006 »
SunMonTueWedThuFriSat
      
1
2
5
7
8
9
10
11
13
14
16
19
20
21
23
24
25
26
29
30
     
Today
XML

Blog::Navigation

GetJava Download Button
Get the Source
Personal Blog

Blog::Referers

Today's Page Hits: 1040

Powered by Roller Weblogger.
« Previous day (Jul 10, 2006) | Main | Next day (Jul 12, 2006) »
20060712 Wednesday July 12, 2006

Bitten by whitespace

I was making a jar file for testing something. I had given a manifest file and a set of classes by the following command line:


    jar cvfm myjar.jar mymanifest.mf *.class

When I used myjar.jar, the manifest entries I specified in my mymanifest.mf were not working as expected. I opened the jar and checked the added manifest.mf in the jar file -- it did not have attributes defined in mymanifest.mf in it! In fact, my manifest.mf had just one attribute!! It turned out that I was bitten by whitespace -- newline was missing at the end of the attribute. Apparently, manifest file spec. mandates newline at the end of attributes. jar tool did not complain about my manifest file :-( Moral of the story: beware of whitespaces!



( Jul 12 2006, 04:51:34 PM IST ) Permalink Comments [1] del.icio.us | furl | simpy | slashdot | technorati | digg

Copyright (C) 2005, A. Sundararajan's Weblog