aspose file tools*
The moose likes JNLP and Web Start and the fly likes Installing a Java Application from web-app. 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 "Installing a Java Application from web-app." Watch "Installing a Java Application from web-app." New topic
Author

Installing a Java Application from web-app.

Kevin DesLauriers
Ranch Hand

Joined: Nov 28, 2005
Posts: 43
I am hoping that someone can help me with this one.

I have a web-app that contains web services that a client application I created will make calls to. I want to create a link on one of the jsps that will allow particular users the ability to click the link and it will download and install the client application on the users local machine. The software contains a couple of properties file and a handful of libs (one of those containing the main function).

I was thinking that this can be accomplished using JNLP. I want to place a shortcut for the application in the StartUp in the Menu.

Thanks for any help you can supply!
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Sure, that seems perfectly reasonable to me. What kind of help did you have in mind?

(If you haven't read the JNLP tutorial, that would be a good place to start before asking for help. Google keywords: jnlp tutorial)
Kevin DesLauriers
Ranch Hand

Joined: Nov 28, 2005
Posts: 43
I have done a few hours reading different tutorials. I was just not sure how to download the jars, property and log files into a particular directory and then place a shortcut in the Start Up. I want as little user interaction as possible. I was hoping to house the complete client application on the local machine. The properties file and the log file need to be accessed by the user on their local machine.

I was under the impression that everything had to be located in the jar where the actual code is located. I want a single click to download and install the application on the client machine. How do I specify where the application is installed and how to install it? Do I have to use the JNLP API or is it just about creating a .jnlp file in my web-app and supplying a link to it via one of my jsps?

The installed structure currently is:

installation folder
    lib folder
       main client jar
       dependency jars (ie. log4j, axis2 etc)
    logs
       error.log
       info.log
    application.properties
    application.bat <- batch file that calls javaw with the main class, etc


If you could point me in the direction of a tutorial that does something like this I would appreciate it.

Thanks

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

As far as I know you have to set up a JNLP file and a link to a URL which is capable of downloading it to the client. This file will contain references to the jars which constitute your application and of course they should be put in a place on the server where they will be downloaded. You do get to specify the URL to each jar in your JNLP file. The simplest thing is to just put them in the same directory as your HTML files, but if you want to put them in a subdirectory called "lib", then "lib" would be part of their URLs.

I don't believe there is a restriction to only one jar in the application's classpath, at least I haven't ever seen that said in any tutorial. Correct me if you have a link to a tutorial which says that.
Kevin DesLauriers
Ranch Hand

Joined: Nov 28, 2005
Posts: 43
I will be working on this over the next couple of days. When I come up with a solution, I will let you know.

Thanks.
 
wood burning stoves
 
subject: Installing a Java Application from web-app.