Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I make use of WebStart?

 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are developing a swing based tool, which will initially be used as a stand alone application and after some time it would be web enabled.Hence the architecture is based on n-tier and we have clear seperation of GUI and server side logics.
Currently, the starting class is a JApplet and all other classed are derived from JFrame/JInternalFrame. I have read thru some of the Webstart articles. I would appreciate if you can clarify the following doubts.
#1 Can I use Webstart to install my Stand alone application and is there any guidelines?
#2 When my app become web enabled in the future, I can use Webstart and I can configure my JNLP file to invoke the main() method on my starting applet class.
Does it mean that I need NOT use JApplet at all to make my app web enabled.
#3 When I launch an app using Webstart, does it care about the browser on the client machine and how the webstart is linked with the browser on a client machine?
BTW I have just ordered the book written by Mauro.
Thanks in Advance
SR
 
Robert Ziel
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
just download it from the java website
and adjust your webserver add the mimetype jnlp
place a .jnlp file on your server for example see
the sun's website..
that should do the trick..
you can use a normal main application
hope this helps ,
Robert
 
Hema Menon
Ranch Hand
Posts: 569
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1 Can I use Webstart to install my Stand alone application and is there any guidelines?
I believe it is possible.
#2 When my app become web enabled in the future, I can use Webstart and I can configure my JNLP file to invoke the main() method on my starting applet class.
If the application is deployed as a jar, manifest file can be specified with main class to launch the application thru webstart.
#3 When I launch an app using Webstart, does it care about the browser on the client machine and how the webstart is linked with the browser on a client machine?
The client needs to have Javawebstart installed, so that the browser understands how to launch a jnlp file. Sun's site has scripts to check if the client machine has java webstart installed or not.
Hema
 
Vishy Janardhan
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
#1 Can I use Webstart to install my Stand alone application and is there any guidelines?
Yes..most certainly u can. You just need to make up the jnlp file (referencing all the resources from the proper places)...deploy the jar files on the server.

#2 When my app become web enabled in the future, I can use Webstart and I can configure my JNLP file to invoke the main() method on my starting applet class.
Certainly. Just include the following tags in your jnlp file to invoke your main class...
<application-desc main-class="abc.xyz.MyMainClassThatUsesSwing">
</application-desc>

Does it mean that I need NOT use JApplet at all to make my app web enabled.
Yup.

#3 When I launch an app using Webstart, does it care about the browser on the client machine and how the webstart is linked with the browser on a client machine?

You need not start a application using the browser. Java web start runs independantly of the web-browser. The .jnlp file type is registered on your machine to java webstart. So, when a jnlp file is run...java webstart is invoked automatically. As an example..just create a .jnlp file in your local hard disk...and run it (say..double click in windows)....your deployed application would be automatically lauched without going through the browser.
 
Rob Ross
Bartender
Posts: 2205
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vish_J. Welcome to JavaRanch!
Please change your name to comply with the naming policy to which you agreed when you registered here..

For your publicly displayed name,
use a first name, a space, and a last name.

You can change your name:
here

You can also find the naming policy:
here
Thank You!
 
Sri Rangan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have one more question:
What exactly do you mean by web enabled?
I can start the swing application using the JNLP file and it will down load the latest jar from some webserver.
While running the application thru webstart,similar to JSP, can each request from swing client be directed to the webserver to fetch the data from remote database
Thanks
Sri
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic