I don't recall having to do that once JWS is installed on the client. The
only thing that springs to mind is setting the mime type on a web server:
I got friend to do a JRE install on a Java virgin machine, and lo to
my delight, it set up the association.
I now how have a self installing Java Web Start CD. I am 99% there. I
think the problem has to do when you use trailing / and when you
don't.
You just put it in, and up comes the familiar dialog box about "do you
Trust this Roedy Green fellah with this certificate."
The key is this little C: program that autorun.inf
kicks off.. It is crude but simple. It depends on 26 variants of the
JNLP file being automatically generated.
/**
* setup.cpp :
* invokes corresponding setup?.jnlp file when invoked from a CD
* setup.exe usually triggered by autorun.inf
* For windows only.
* copyright (c) 2003 Roedy Green, Canadian Mind Products
* #327 - 964 Heywood Avenue
* Victoria, BC Canada V8V 2Y5
* tel
250) 361-9093
*
http://mindprod.com
*/
#include "stdafx.h" /* standard precompiled header */
#include <direct.h> /* chdir, mkdir */
#include <process.h> /* exec, spawn */
#include <stdio.h> /* fclose, fgetc, printf, remove, rename, setvbuf
*/
#include <stdlib.h> /* exit, putenv, _splitpath */
#include <string.h> /* strcpy, strcat, strcmp, strupr */
/* Configure root name of all the jnlp files we might invoke */
const char* jnlpBaseName = "replicatorreceivercd";
// Java webstart is usually here, but we can't count on it.
// "C:\\Program Files\\Java\\j2re1.4.2_01\\javaws\\javaws.exe";
int main( int argc, char* argv[] )
{
// get current drive letter.
char curDrive = 'A' + _getdrive() - 1;
// generate name of jnlp file corresponding to CD drive letter
char jnlpName [50];
strcpy( jnlpName, jnlpBaseName );
// tack on drive letter
int baseLength = strlen( jnlpBaseName );
jnlpName[ baseLength ] = curDrive;
jnlpName[ baseLength + 1 ] = 0;
strcat ( jnlpName, ".jnlp" );
printf ("Installing %s with Java Web Start\n", jnlpName );
// start up Java Web Start with for example
replicatorreceiverR.jnlp
// cmd.exe on path in c:\winnt\system32
if ( _spawnlp( _P_OVERLAY, "cmd.exe", "cmd.exe", "/C", jnlpName,
NULL ) )
{
// ENOENT = 2 = not found
// EINVAL = 22 = invalid arg
printf ("Java Web Start must be installed first. Error %u\n",
errno );
}
return 0;
}