Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

JNLP and Add/Remove Programs

Thread view: 
Steven J. Sobol - 17 Apr 2007 23:03 GMT
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?

Signature

Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California     PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.

Andrew Thompson - 18 Apr 2007 00:43 GMT
>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.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Andrew Thompson - 18 Apr 2007 03:18 GMT
>>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.

Not that for the purposes of devlopment, it is much
simpler and easier to call the jws -uninstall option
to remove an application from the web start cache.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Steven J. Sobol - 18 Apr 2007 05:09 GMT
>>I created a small Swing test app and deployed it with this JNLP file:
> .
[quoted text clipped - 4 lines]
> 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.

Signature

Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California     PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.

Andrew Thompson - 18 Apr 2007 07:41 GMT
>>>I created a small Swing test app and deployed it with this JNLP file:
...
>> AFAIU there is the intention of integrating them into the usual
>> Win. Add/Remove programs dialog eventually.
..
>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.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Steven J. Sobol - 18 Apr 2007 15:20 GMT
> So, after a bit more digging, I found that two that were
> listed in the web start cache but not the Windows
[quoted text clipped - 3 lines]
>
> 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.

Signature

Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California     PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.

Steven J. Sobol - 18 Apr 2007 15:25 GMT
> 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!

Signature

Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California     PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.

Andrew Thompson - 18 Apr 2007 15:44 GMT
> (Andrew T. wrote)
>> So, after a bit more digging, I found that two that were
[quoted text clipped - 6 lines]
>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

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Steven J. Sobol - 18 Apr 2007 19:15 GMT
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

Signature

Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California     PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.