-
Bug
-
Resolution: Duplicate
-
P3
-
1.4.2
-
None
-
generic
-
generic
java.util.jar.Manifest class doesn't behave the same way when it is read or written.
Consider a simple j2me manifest file:
MIDlet-1: Blackjack, BlackjackS60Tr.png, com.mobilsoft.blackjack.BlackJack
MIDlet-Name: Blackjack
MIDlet-Vendor: Mobilsoft
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
Now, if code is executed:
Manifest mf = new Manifest(new FileInputStream('manifest'));
mf.write(new FileOutputStream('manifest2'));
the resulted file 'manifest2' will be empty.
Apparently, when manifest write itself, only main attributes are written.
(Manifest.write() calls Attributes.writeMain()). However, when Manifest.getMainAttributes() is called, all attributes, that are not per entry
attributes are returned.
This looks like a bad experience, first, I don't see how the J2ME manifests
can be handled (read/written), and why the 'main' attributes are treated
differently when writing manifest, or when asking for main attributes programmatically.
Please contact ###@###.### for more inforamtion.
###@###.### 2005-07-05 22:27:14 GMT
Consider a simple j2me manifest file:
MIDlet-1: Blackjack, BlackjackS60Tr.png, com.mobilsoft.blackjack.BlackJack
MIDlet-Name: Blackjack
MIDlet-Vendor: Mobilsoft
MIDlet-Version: 1.0
MicroEdition-Configuration: CLDC-1.0
MicroEdition-Profile: MIDP-1.0
Now, if code is executed:
Manifest mf = new Manifest(new FileInputStream('manifest'));
mf.write(new FileOutputStream('manifest2'));
the resulted file 'manifest2' will be empty.
Apparently, when manifest write itself, only main attributes are written.
(Manifest.write() calls Attributes.writeMain()). However, when Manifest.getMainAttributes() is called, all attributes, that are not per entry
attributes are returned.
This looks like a bad experience, first, I don't see how the J2ME manifests
can be handled (read/written), and why the 'main' attributes are treated
differently when writing manifest, or when asking for main attributes programmatically.
Please contact ###@###.### for more inforamtion.
###@###.### 2005-07-05 22:27:14 GMT
- duplicates
-
JDK-4271239 Manifest.write(OutputStream) does not write main attrs when no Manifest-Version
-
- Open
-