FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
In one sentence, a trailing space character in the MANIFEST.MF file is treated by the parser as part of the option's value, which results in unexpected behavior.
I ran into this while test-driving the new Mustang's splash screen feature (which is pretty neat when it works). I exported the application in a jar, with the following manifest:
[code]
Manifest-Version: 1.0
Main-Class: ima.dialogs.main.MainFrame
SplashScreen-Image: icons/iMA_logo.gif
Class-Path: ../iText/itext-1.3.jar ../icons/jlfgr-1_0.jar
[/code]
As a result of a cut-and-paste operation, the third line, namely [code]
SplashScreen-Image: icons/iMA_logo.gif[/code]
, ended with a blank character. This caused the splash screen NOT to show. I spent a fair amount of time figuring out what's wrong - verifying that the referenced GIF is actually in the jar, trying to place GIF in the root of the jar, etc..., until I accidentally noticed this trailing blank.
I actually tried exporting a jar with and without this blank character and verified that it is indeed causing problems.
This started as a forum post:
http://forum.java.sun.com/thread.jspa?threadID=790708
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
As detailed above, add a blank (" ") at the end of line that starts with SplashScreen-Image in the manifest file. I did not experiment with other MANIFEST options and other Java releases.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would not expect trailing blanks to affect anything. It's just weird.
ACTUAL -
With the trailing blank in place, the splash screen is not shown then the exported jar is executed, e.g. java -jar testApp.jar
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]
A DESCRIPTION OF THE PROBLEM :
In one sentence, a trailing space character in the MANIFEST.MF file is treated by the parser as part of the option's value, which results in unexpected behavior.
I ran into this while test-driving the new Mustang's splash screen feature (which is pretty neat when it works). I exported the application in a jar, with the following manifest:
[code]
Manifest-Version: 1.0
Main-Class: ima.dialogs.main.MainFrame
SplashScreen-Image: icons/iMA_logo.gif
Class-Path: ../iText/itext-1.3.jar ../icons/jlfgr-1_0.jar
[/code]
As a result of a cut-and-paste operation, the third line, namely [code]
SplashScreen-Image: icons/iMA_logo.gif[/code]
, ended with a blank character. This caused the splash screen NOT to show. I spent a fair amount of time figuring out what's wrong - verifying that the referenced GIF is actually in the jar, trying to place GIF in the root of the jar, etc..., until I accidentally noticed this trailing blank.
I actually tried exporting a jar with and without this blank character and verified that it is indeed causing problems.
This started as a forum post:
http://forum.java.sun.com/thread.jspa?threadID=790708
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
As detailed above, add a blank (" ") at the end of line that starts with SplashScreen-Image in the manifest file. I did not experiment with other MANIFEST options and other Java releases.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would not expect trailing blanks to affect anything. It's just weird.
ACTUAL -
With the trailing blank in place, the splash screen is not shown then the exported jar is executed, e.g. java -jar testApp.jar
REPRODUCIBILITY :
This bug can be reproduced always.
- relates to
-
JDK-4274235 Class-Path attribute of manifest file needs new line character at end of line
-
- Closed
-