0

I have a JAR file generated by an ANT script with the following code in it:

<manifest>
   <attribute name="Main-Class" value="org.epistasis.exstracs.Main"/>
   <attribute name="Class-Path" value="."/>
   <attribute name="SplashScreen-Image" value="logo_anim.gif"/>
</manifest>
<!--Some code-->
<zipfileset dir="." includes="logo.png"/>
<zipfileset dir="." includes="logo_anim.gif"/>
<zipfileset dir="." includes="icon.png"/>

When I run the JAR file, no splash screen is generated. I verified that the GIF was in the file by opening it with my favorite archive manager. I also loaded the GIF from the code and successfully displayed it. However, it won't load as a splashscreen. (no splashscreen displayed, SplashScreen.getSplashScreen() returns null)

If I replace

<attribute name="SplashScreen-Image" value="logo_anim.gif"/>

With

<attribute name="SplashScreen-Image" value="logo.png"/>

OR

<attribute name="SplashScreen-Image" value="icon.png"/>

The splashscreen is displayed with the specified image.

I'm not sure if this matters, but the GIF is significantly larger than the PNG files. (~2MB for logo_anim.gif vs 40KB for logo.png)

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Ryan Amos
  • 5,422
  • 4
  • 36
  • 56
  • *"the GIF is significantly larger than the PNG files. (~2MB..!"* It never occurred to you that 2MB is ***far too large*** for a splash screen image?!? How big is the app. itself? – Andrew Thompson Sep 04 '13 at 02:34
  • @AndrewThompson I thought it might be too large, but the image will load in the browser without a problem, and the first frame will render if I use `Graphics.drawImage`. The JAR ends up being 15MB, I think, 17 with the animated GIF. – Ryan Amos Sep 04 '13 at 05:15

0 Answers0