users@glassfish.java.net

Splash screen and icon for app-client using <jnlp-doc> in sun-app-client.xm

From: <glassfish_at_javadesktop.org>
Date: Sat, 02 Oct 2010 12:52:56 PDT

Hi,

I've been using the
ImageName:ImageName:App name trick to embed a splash screen and icon in the generated jnlp file for an app-client. It works fine on windows but it doesn't work on mac.

When launching from Mac, either the icon or the splash screen are not show.

Recently, I decided to take advantage of Tim's <jnlp-doc> to add desktop shortcut creation on deployment. It's a pretty cool feature.

Being there I thought that by adding the splash screen to my custom jnlp file, would not only be more tidy but the mac clients might prefer this way too.


With the glassfish v2 way of adding the splash screen, I would place my images in the root of the app-client sources (default package) for example
image.png:image.png:Name of my app

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-application-client PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 Application Client 6.0//EN" "http://www.sun.com/software/appserver/dtds/sun-application-client_6_0-0.dtd">
<sun-application-client>
  <java-web-start-access>
    <vendor>Squirrel.png::Squirrel.png::Anahata Technologies</vendor>
    <jnlp-doc>/META-INF/salute.jnlp</jnlp-doc>
  </java-web-start-access>
</sun-application-client>

Taking advantage of the jnlp-doc feature, I tried this:


<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="" href="">
    <information>
        <title>Squirrel v1.0</title>
        <vendor>Anahata Technologies PTY LTD</vendor>
        <shortcut online="true">
            <desktop/>
            <menu submenu="Squirrel"/>
        </shortcut>

        <icon href="Squirrel.png" kind="default"/>
        <icon href="Squirrel.png" kind="splash"/>
    </information>
</jnlp>


But by doing this, java web start doesn't at all find the images.

The question is, how to preffix the url of the images inside href="" or where should i place them in the folder structure of my project?

Thanks.
[Message sent by forum member 'pablopina']

http://forums.java.net/jive/thread.jspa?messageID=484173