I know this is probably close to a duplicate of this thread: Animated GIF in Splashscreen
But since it seems unanswered and I can't comment on it or anything I'm sorry to repost this but it would be awesome if someone could give me an answer.
I am making a game and this game takes quite a lot of time to start. Therefore I want to give the user feedback during the loading screen so he knows the application hasn't crashed. That's why I use the SplashScreen API from java 7.
In eclipse, when I run my application using the following configuration in VM Arguments, SplashScreen.getSplashScreen()
returns null
.
-splash:src/aapplication/Splash.gif
But when I use this configuration, it works fine (I have to files in the same package, one is Splash.png
and the other Splash.gif
):
-splash:src/aapplication/Splash.png
In a jar file (in MANIFEST.MF
), this doesn't work:
SplashScreen-Image: aapplication/Splash.gif
While this does:
SplashScreen-Image: aapplication/Splash.png
My GIF is about 1Mb in size while the PNG is 50kb.
Can anyone explain to me why does the GIF can't even be loaded while the PNG does (I know it's not the path since they have the same)?
Everywhere I looked, it said it should work just as fine as for PNGs.
Thanks for your help!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…