If java was already installed then it would start the applet, even if the network was not connected. The new recommended practice is to use the deployJava.js script. The problem is that deployJava is always run, and if the network is down then the script hangs up and the applet fails to load (even if all of the required bits of the JRE are present).
<object classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase = "http://java.sun.com/update/1.4.2/jinstall-1_4-windows-i586.cab#Version=1,4,0,0" etc....
tmoore41 wrote:If you want it to run off pages on the local disk, it is a mystery to me why you do not:
..I am trying to create a web page that contains an applet. These pages can be stored on servers or local disks. If the page is on the local disk, I would like to have it viewable whether or not the internet is connected or not.
tmoore41 wrote:Webstart is only for launching applets (or applications), it definitely does not launch web pages. Your description of a 'monolithic RIA' makes me reconsider the benefit of my advice. Truth is, a lot of people have applets embedded in web pages for no good reason - whereas from your description, it seems that is not the case for your web-app. If the applets (for example) interact with the web page via. JS - that is not a functionality that webstart can emulate/handle.
Thanks for the quick reply Andrew. I don't quite understand your solution, or maybe you don't quite understand my problem. I have a series of web pages, some of them contain applets. This is not a monolithic RIA. I would like to be able to navigate through the web pages on the internet, or off of a CD or local disk with or without internet access. If the client has no internet access I would like the web pages to load if possible. If they do have internet access but no java then I would like to make it easier for them to install java.
When you say "Launch it using webstart" what do you mean by 'it'? The web page?
tmoore41 wrote:Good question. I had to chase up the webmaster of mindprod.com to alter his pages to reflect that the preferred method was to hot-link to Sun's own script. It never occured to me to question that Sun might not allow not hot-linking to the script. Now I go looking over their documentation on the script, it is not really clear.
Ok, I'll give it a try just to see what happens. I am not sure that this is such a good solution however:
1) I am not sure that I have permission to redistribute deployJava.js with my project. What is the license for it? When I download the script it has been stripped of all comments.
2) How can I ensure that the installation methods will be kept up to date If I 'hard code' the deployment methods by distributing them myself?You can't. That is one downside of using a copy of the script.
.. Are there specific version dependencies within the deployJava.js script that need to be updated once in a while?Not that I know of. Though Sun might upload changes to correct bugs in various browsers.
I am guessing that one of the design elements of the 'deployJava.js' script is that since it is on a sun server it can be kept up to date over time. This cannot happen once it is frozen in to my distribution.Well summed up.
It would be nice if deployJava.js checked if the java install was adequate, and if not then went out to the network to get instructions on what to do next. It is too hard for me to tell what is going on in the whitespaced-stripped file however. Any internal documentation on what deployJava.js does?See what you can figure from the link above, and related documentation.