• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Installing a Java Application from web-app.

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic