JNLP and Add/Remove Programs

S

Steven J. Sobol

I created a small Swing test app and deployed it with this JNLP file:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://stevesobol.com">
<information>
<title>SS Test</title>
<vendor>Steve Sobol</vendor>
<homepage href="/blogged" />
<description>Test 1</description>
<icon href="/content/test1.png"/>
<icon href="/content/test1s.png" kind="splash"/>
</information>
<offline-allowed/>
<security>
<j2ee-application-client-permissions/>
</security>
<resources>
<j2se version="1.4+" />
<jar href="/content/test1.jar"/>
</resources>
<application-desc main-class="net.justthe.pcregistry.Test" />
</jnlp>

How do I get the downloaded file to show up in Add/Remove Programs on
Windows XP SP2 and Windows Vista?
 
A

Andrew Thompson

Steven said:
I created a small Swing test app and deployed it with this JNLP file: ..
How do I get the downloaded file to show up in Add/Remove Programs on
Windows XP SP2 and Windows Vista?

JWS apps. are added/removed using the Java Control Panel.
AFAIU there is the intention of integrating them into the usual
Win. Add/Remove programs dialog eventually.
 
S

Steven J. Sobol

JWS apps. are added/removed using the Java Control Panel.
AFAIU there is the intention of integrating them into the usual
Win. Add/Remove programs dialog eventually.

But I've seen JWS apps do it. I can do it with Microsoft .NET's
equivalent technology (Single-Click, I think it's called, I forget),
but I'd much rather do it with Web Start.

Sun's own Web Start demos install themselves into Add/Remove Programs,
and the documentation I've seen says that is supposed to happen when a
user deploys Web Start apps to his computer.

I guess I'm a little confused.
 
A

Andrew Thompson

Steven said:
..
I guess I'm a little confused.

No. It's me that's confused! After your further description,
I though to check some of my own JWS apps. (written by
me), only to find they were also listed in the normal Windows
add/remove programs dialog.

So, after a bit more digging, I found that two that were
listed in the web start cache but not the Windows
add/remove. The only consistent thing between them
was that they did not suggest a desktop icon or menu
item.

Maybe that is the decider.
 
S

Steven J. Sobol

So, after a bit more digging, I found that two that were
listed in the web start cache but not the Windows
add/remove. The only consistent thing between them
was that they did not suggest a desktop icon or menu
item.

Maybe that is the decider.

Thanks. At least now I know I'm not crazy. :) I think I'll dig up my
old Sun developer login and go ask on their forums.
 
S

Steven J. Sobol

So, after a bit more digging, I found that two that were
listed in the web start cache but not the Windows
add/remove. The only consistent thing between them
was that they did not suggest a desktop icon or menu
item.

Could you do me a huge favor... could you please post two of your
deployment descriptors, one from a program that doesn't get added to
add/remove, and one that does. Either post here or email me
out-of-band; the address I use to post is a deliverable address.
Thanks in advance!
 
A

Andrew Thompson

Steven said:
(Andrew T. wrote)

..could you please post two of your
deployment descriptors, one from a program that doesn't get added to
add/remove, and one that does.

Not included in Win. add/remove programs.

<jnlp
spec="1.0"
codebase="http://www.physci.org/pc/"
href="http://www.physci.org/pc/jtest.jnlp">
<information>
<title>JTest Properties Application</title>
<vendor>PhySci - Andrew Thompson</vendor>
<homepage href="null"/>
<description>
Application form of the JTest properties inspector
</description>
<offline-allowed/>
</information>
<update check="timeout" policy="always"/>
<resources>
<java
href="http://java.sun.com/products/autodl/j2se"
version="1.2+"/>
<jar
href="http://www.physci.org/pc/JTest.jar"
download="eager"
main="false"/>
</resources>
<application-desc main-class="PropertiesApplet"/>
</jnlp>

Included in Win. add/remove programs.

<jnlp spec="1.0"
codebase="http://www.physci.org/jws/"
href="http://www.physci.org/jws/basicserv.jnlp">
<information>
<title>Basic Service</title>
<vendor>Andrew Thompson</vendor>
<homepage href="null"/>
<description kind="one-line">
Demo of the web-start BasicService
</description>
<shortcut online="false">
<desktop/>
</shortcut>
</information>
<update check="timeout" policy="always"/>
<resources>
<java version="1.2+"/>
<jar
href="http://www.physci.org/jws/basicserv.jar"
download="eager"
main="true"/>
</resources>
<application-desc main-class="test.BasicServiceDemo"/>
</jnlp>

If my latest theory is correct, it is the inclusion of..
<shortcut online="false">
<desktop/>
</shortcut>
..in the second launch file that makes the difference.

HTH
 
S

Steven J. Sobol

Thank you, Andrew:

<shortcut online="false">
<desktop/>
</shortcut>
If my latest theory is correct, it is the inclusion of..
<shortcut online="false">
<desktop/>
</shortcut>
.in the second launch file that makes the difference.


That it is. I couldn't find a description of the shortcut element on
any of the tutorials, but in the JNLP 1.5 Specification it says

"The optional shortcut element can be used to indicate an
application's preferences for desktop integration. The shortcut
element and it's sub-elements provide hints that the JNLP Client may
or may not use. The shortcut element can contain the optional online
attribute, and the two optional sub-elements desktop and menu."

This puts shortcuts on the desktop, and in the My Corporation Apps
folder on the Start menu (from jnlp-1_5-mr-spec.pdf):

<shortcut online="false">
<desktop/>
<menu submenu="My Corporation Apps"/>
</shortcut>

"online" is either true or false depending on whether you want the app
to run online or not.

You can also use the shortcut element to associate your program with
certain MIME types and file extensions using <association>.

By using an empty shortcut element like this

<shortcut online="false"/>

I was able to get the program into Add/Remove without having to create
any shortcuts.

I'd suggest downloading the Java 1.5 JNLP specification PDF as it
documents all this, but none of the tutorials do, not even Sun's
tutorials!

http://java.sun.com/products/javawebstart/download-spec.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top