Re: Updating helper Jar while in use

Pete Soper <[email protected]> Tue, 28 Feb 2012 12:36:01 -0500
Newsgroups gmane.org.user-groups.trijug.juglist
Message-ID <[email protected]>
On 02/27/2012 01:40 PM, Terry Waranch wrote:
>
> Hi,
>
> We run java programs from  .jar files.  We have help .jar files.  Is 
> it okay to update a helper .jar file while a running program is using it?
>
Hi Terry,

Short answer: If you're using java.util.JarFile and reading the help 
info with plain I/O operations and you have access to the source code 
that does the I/O,then "okay and probably pretty easy." If you're 
getting the help info via classes loaded from the jar file then the 
problem varies from "okay but difficult" to "not okay by virtue of being 
impossible", depending on a bunch of factors. I think Philip is assuming 
you're using class loading and so he suggested the Karaf system as a way 
to delegate this to a proven system rather than trying to roll your own. 
On a clear day with a slight tailwind reliable class unloading is merely 
difficult and the rest of the time it's frequently one of the harder 
problems involving Java, assuming your Java implementation allows it. 
For example, it's my understanding that Android doesn't unload classes 
even when the classloader object involved is made unreferenced and is 
garbage collected.

-Pete


> Thanks for your reply,
>
> Terry
>
> *Terry N. Waranch
> *Sr. Business Analyst/Developer
> *R**EPLACEMENTS, **L**TD.*
> PO Box 26029
> Greensboro, NC  27420-6029
> 336-697-3000, ext. 2298
> Fax:  336-697-3100
> [email protected] <mailto:[email protected]>
> www.replacements.com <http://www.replacements.com/>
>
> NOTICE:  This message may contain information that is confidential, 
> proprietary, and privileged.  If you are not the intended recipient, 
> you may not use, print, copy, disseminate, or retain this message or 
> any information contained in this message, including in any 
> attachments to it.  If you have received this message in error, please 
> notify the sender by reply email and delete this message and any 
> attachments to it from your system(s).  Thank you for your cooperation.
>
>
> _______________________________________________
> Juglist mailing list
> [email protected]
> http://lists.trijug.org/mailman/listinfo/juglist_lists.trijug.org

_______________________________________________
Juglist mailing list
[email protected]
http://lists.trijug.org/mailman/listinfo/juglist_lists.trijug.org