Java 6启动画面 [英] Java 6 Splash Screen

查看:176
本文介绍了Java 6启动画面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从来没有能够让Java 6启动画面工作。

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

我已经尝试了所有我能想到的东西。我的manifest.mf包含:

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

我把文件geotragsplashscreen.gif在我的源代码树的根目录中,并验证它是否成为生成的.jar文件的根目录。我也在各个地方尝试过,再次确认它在jar中的位置,并将路径放在SplashScreen-Image中。

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.

它永远不会出现。

尝试在运行时获取启动画面失败:

Attempts to get the splash screen at runtime fail:

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

对我来说,splash始终为空。

splash is always null for me.

关于我在这里缺少什么的任何想法?

Any ideas on what I'm missing here?

推荐答案

这里的步骤工作

  • http://java.sun.com/docs/books/tutorial/uiswing/misc/splashscreen.html

几个笔记:


  1. 将启动画面图像放在JAR文件中


    • 例如: images / splash.gif

  1. Place the splash screen image in your JAR file
    • for example: images/splash.gif

  • 例如: SplashScreen-Image:images / splash.gif

  • for example: SplashScreen-Image: images/splash.gif

这篇关于Java 6启动画面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆