views:

393

answers:

2

I've never been able to get the Java 6 splash screen to work.

I've tried everything I can think of. My manifest.mf contains:

Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
SplashScreen-Image: geotagsplashscreen.gif

I put file "geotragsplashscreen.gif" in the root of my source tree, and verify that it makes it into the root of the resulting .jar file. I've also tried it in various places, again confirming its position in the jar, and put the path in SplashScreen-Image.

It never shows up.

Attempts to get the splash screen at runtime fail:

    final SplashScreen splash = SplashScreen.getSplashScreen();
    if (splash == null) {
        return;
    }

splash is always null for me.

Any ideas on what I'm missing here?

A: 

It is really easy to use, I always followed sun tutorial with sucess: http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javase6/splashscreen/ http://java.sun.com/docs/books/tutorial/uiswing/misc/splashscreen.html

AlfaTeK
+1  A: 

The steps here work

Couple of notes:

  1. Place the splash screen image in your JAR file
    • for example: images/splash.gif
  2. Do not use a leading slash when referencing the file in manifest
    • for example: SplashScreen-Image: images/splash.gif
Eric Wright