Instead of trying to send the JAR down you should rather URLClassLoad your
application using the URLClassLoader class, see:
http://java.sun.com/j2se/1.4.1/docs/api/java/net/URLClassLoader.html.

Unforntunately I no longer have a code snippet to illuistrate this, but the
basic technique is as follows, you manually deploy (once only) a litle 1K
launcher program to all your clients, this in turn URLClassLoads the main
class of your application, the rest of the application will automatically
URLClassLoad itself as all additional classes will be loaded with the same
class loader.

Now if any classes are changed in your application then the next time any
user runs the app they will run the new class. Note that if you need to
change the launcher program this needs to be manually re-deployed. However
once it is working you rarely need to change it.

Cheers
Adrian.

> -----Original Message-----
> From: Lyubomir Pashov [SMTP:[EMAIL PROTECTED]]
> Sent: 23 January 2003 05:59
> To:   [EMAIL PROTECTED]
> Subject:      How to make transfer of JAR file through servlet?
>
> Hello,
> I need to extend one of my client applications to be able to perform auto
> update. But I wonder how to make the servlet's method (and the client's
> method) which will make the transfer of the new  application's JAR file to
> the client...
>
> Could anybody show me a snipped of code, which will do the actual transfer
> (of the Jar fail)? (from both - the Servlet's side and the client
> application's side)
>
> Thanks in advanse!
> Best regards,
> Lyubo.
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--

It is the strict policy of Truworths that its e-mail facility and all
e-mail communications emanating therefrom, should be utilised for
business purposes only and should conform to high professional and
business standards.   Truworths has stipulated certain regulations in
terms whereof strict guidelines relating to the use and content of
e-mail communications are laid down. The use of the Truworths e-mail
facility is not permitted for the distribution of chain letters or
offensive mail of any nature whatsoever.   Truworths hereby distances
itself from and accepts no liability in respect of the unauthorised
use of its e-mail facility or the sending of e-mail communications
for other than strictly business purposes.   Truworths furthermore
disclaims liability for any  unauthorised instruction for  which
permission was not granted.    Truworths Limited accepts no liability
for any consequences arising from or as a result of reliance on this
message unless it is in respect of bona fide Truworths business for
which proper authorisation has been granted.

Any recipient of an unacceptable communication, a chain letter or
offensive material of any nature is requested to notify the Truworths
e-mail administrator ([EMAIL PROTECTED]) immediately in order that
appropriate action can be taken against the individual concerned.

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to