Creating short cuts fails
Seems my problems with failed creating of icons was largly due to caching.
Yet Java web start does not create menu icons for me in GNOME (2.16.1). Normal or not?
/// Old post, no longer relevant.
Hosts are running Java 6 and the problem occurs on Windows XP/Ubuntu Edgy. (those are the only systems tested)
I Want to create a desktop icon / start menu icon for my program.
It actually managed to create a desktop icon on the nix machine a few times. Each time resetting the icons position on the desktop. (I'm guessing it is getting recreated each time and that's also not what users want). But now even creating a desktop icon no longer works.
When the icon got created, normally the user should have been asked to do so. But he was not.
Please help me sort out how to create a start menu entry and a desktop icon.
This is my jnlp:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
<jnlp codebase="$$codebase" href="foldersync.jnlp">
<information>
<title>Foldersync</title>
<vendor>Free Software <boutensj@users.sourceforge.net></vendor>
<homepage href="http://sourceforge.net/projects/foldersync/"/>
<description>Folder synchronization, the easy way...</description>
<icon href="dist/lib/foldersync.gif"/>
<icon href="dist/lib/splash.gif" kind="splash"/>
<offline-allowed/>
<shortcut online="true">
<desktop/>
<menu submenu="Foldersync"/>
</shortcut>
</information>
<security>
<all-permissions/>
</security>
<resources locale="" os="">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
</resources>
<resources>
<jar download="eager" href="dist/foldersync.jar" main="false"/>
</resources>
<resources locale="" os="">
<nativelib download="eager" href="dist/lib/swing-layout-1.0.jar" version=""/>
</resources>
<application-desc main-class="foldersync.gui.frmMain"/>
</jnlp>
You can run the application from here: http://users.telenet.be/greenhouse/foldersync.jnlp
Message was edited by:
finalbeta
Message was edited by:
finalbeta
[2537 byte] By [
finalbetaa] at [2007-11-26 15:59:40]

# 1
I saw some suspicious aspects in the posted
JNLP file, and checked it here..
http://www.xml.com/pub/a/tools/ruwf/check.html
The result is..
not well-formed (invalid token) at line 6, column 31, byte 280:
<information>
<title>Foldersync</title>
<vendor>Free Software <boutensj@users.sourceforge.net></vendor>
==============================^
<homepage href="http://sourceforge.net/projects/foldersync/"/>
<description>Folder synchronization, the easy way...</description>
# 2
When I validate it now, it's well formed.
Problems remain, shortcuts don't get created in menu's for GNOME.
I actually did change things since you've posted.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN" "http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
<jnlp codebase="http://users.telenet.be/greenhouse" href="foldersync.jnlp">
<information>
<title>Foldersync</title>
<vendor>Free Software <mail></vendor>
<homepage href="http://sourceforge.net/projects/foldersync/"/>
<description>Folder synchronization, the easy way...</description>
<icon href="dist/lib/foldersync.gif"/>
<icon href="dist/lib/splash.gif" kind="splash"/>
<offline-allowed/>
<shortcut online="true">
<desktop/>
<menu submenu="Foldersync"/>
</shortcut>
<related-content href="http://license.be/license.txt">
<description kind="short">License.txt</description>
<icon href=""/>
</related-content>
<related-content href="http://license.be/license.txt">
<description kind="short">README.txt</description>
<icon href=""/>
</related-content>
</information>
<security>
<all-permissions/>
</security>
<resources locale="" os="">
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
</resources>
<resources>
<jar download="eager" href="dist/foldersync.jar" main="false"/>
</resources>
<resources locale="" os="">
<nativelib download="eager" href="dist/lib/swing-layout-1.0.jar" version=""/>
</resources>
<application-desc main-class="foldersync.gui.frmMain"/>
</jnlp>
Message was edited by:
finalbeta
# 3
OK.. After a little further investigation, I can add
the following, from the 'JNLP spec.'..
"Client may assume that a typical JNLP file
will have at least an icon in GIF or JPEG
format of 32x32 pixels in 256 colors of the
default kind"
Whereas the only GIF defined in that JNLP
that was not listed as a splash is..
http://users.telenet.be/greenhouse/dist/lib/foldersync.gif
Which is 20x20 px.
I think you have higher chance of getting
it to work X-plat with a 32x32 px GIF/JPG
of 256 colors.
The second thing I will add that a close
inspection of your JNLP as last posted
(you seem to be editing the post regularly,
which is not helpful) indicated it was not only
still invalid, but had quite illogical use
of empty attributes, and resource elements.
The exact JNLP I suggest you test with,
for the moment, is..
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jnlp PUBLIC "-//Sun Microsystems, Inc.//DTD JNLP 1.5//EN"
"http://www.netbeans.org/jnlp/DTD/jnlp.dtd">
<jnlp codebase="http://users.telenet.be/greenhouse" href="foldersync.jnlp">
<information>
<title>Foldersync</title>
<vendor>Free Software</vendor>
<homepage href="http://sourceforge.net/projects/foldersync/"/>
<description>Folder synchronization, the easy way...</description>
<icon href="dist/lib/foldersync.gif"/>
<icon href="dist/lib/splash.gif" kind="splash"/>
<offline-allowed/>
<shortcut online="true">
<desktop/>
<menu submenu="Foldersync"/>
</shortcut>
<related-content href="http://license.be/license.txt">
<description kind="short">License.txt</description>
</related-content>
<related-content href="http://license.be/license.txt">
<description kind="short">README.txt</description>
</related-content>
</information>
<security>
<all-permissions/>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
<jar href="dist/foldersync.jar"/>
<nativelib href="dist/lib/swing-layout-1.0.jar"/>
</resources>
<application-desc main-class="foldersync.gui.frmMain"/>
</jnlp>
# 4
I'll look into that and report back.
Actually, my jnlp validates. Unless you use the xml I posted in this thread. I notice that this forums parses the < > tags I used around my e-mail address. (I'll remember to use CODE tags next time) So if you copy paste from the forum, you would always get an error right after the mail address. While if you parse from the URL, it is well formed
# 5
I'm using the JNLP you suggested and this icon : http://users.telenet.be/greenhouse/dist/lib/foldersync_32x32.gifStill no menu entries in GNOME. Only the desktop one gets created.
# 6
Java Web Start (all versions as of now) has problems creating shortcuts and associations on GNOME versions from 2.8+.The curent implementation is designed for GNOME 2.0, and the interface was changed in 2.8.This will be addressed in a future update release./Andy