File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JNLP and Web Start and the fly likes how to get web start working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "how to get web start working" Watch "how to get web start working" New topic
Author

how to get web start working

muktesh tripathi
Ranch Hand

Joined: Nov 20, 2007
Posts: 30
I have a desktop application developed using netbeans 6.5 IDE(not of importance)..I again using netbeans IDE converted the application to work using webstart.

I placed the .jnlp .html and .jar file in tomcat webapps directory. I am facing following problems.

1. When I try the link using Google Chrome it simply downloads .jnlp file everytime and does nothing else.

2. On using the link with Internet Explorer or Firefox..it first downloads .jnlp file then runs the application all right. But I want to know how to run the application when Tomcat server is not running ( I suppose working offline is the main advantage of using Webstart).. I cant type the url in browser and run it as it will show page not found as tomcat is not running..

3. If I copy the .jnlp file to some directory and the lib folder(my project needs some jar files) and double click it ,it runs the application all right. But I cant ask the client to manually copy the .jnlp file to his machine.

Pse help..
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10246
    
    8

Check out the "shortcut" element in the jnlp file.
It can be configured so that the user gets a shortcut to your application on the desktop as well as Start->Programs


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
muktesh tripathi
Ranch Hand

Joined: Nov 20, 2007
Posts: 30
Thanks for the info..But I require a little more help

my .jnlp file is as shown

<?xml version="1.0" encoding="UTF-8"?>
<jnlp codebase="http://192.168.1.2:8081/retirement/" href="launch.jnlp" spec="1.0+">
<information>
<title>Basic Application Example</title>
<vendor>Sun Microsystems Inc.</vendor>
<homepage href="http://appframework.dev.java.net"/>
<description>A simple java desktop application based on Swing Application Framework</description>
<description kind="short">Basic Application Example</description>


<offline-allowed/>

<shortcut online="true">
<desktop/>
<menu submenu="retire"/>
</shortcut>
</information>


<resources>
<j2se version="1.5+"/>
<jar eager="true" href="RetirementPlanningApp.jar" main="true"/>


<jar href="lib/appframework-1.0.3.jar"/>
<jar href="lib/swing-worker-1.1.jar"/>
</resources>
<application-desc main-class="retirementplanningapp.RetirementPlanningApp">

</application-desc>
</jnlp>


But still desktop icon or menu items are not created..Please help
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10246
    
    8

Hmmm.
Looks like you need to check your java settings.
If you are on Windoze,
start->settings->controlPanel->java->Advanced->shortcut creation.
muktesh tripathi
Ranch Hand

Joined: Nov 20, 2007
Posts: 30
Thanks but still not working..
Anything wrong with my .jnlp file....specially shortcut element???

thanks
muktesh tripathi
Ranch Hand

Joined: Nov 20, 2007
Posts: 30
Does my problem has to do anything with SIGNING jar files....I have not done that till now....
muktesh tripathi
Ranch Hand

Joined: Nov 20, 2007
Posts: 30
:lol: Thanks I got the shortcut...had to manually clear cache..

But I want to know if client accidently deletes the shortcut on the desktop...and tries to re-download application from web...he will not get shortcut.....or is this happening with me only??? :roll:
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

I don't think it should be difficult for you to try that yourself.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get web start working