[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Equinox P2 executable updates

Before John's mail I took it for granted that p2 is already doing it in that way - I never tested it with p2.
So, thanks John for mentioning that!

Has anyone the possibility to test that on Linux and Mac?

Stefan

Andrew Niefer wrote:

p2-dev-bounces@xxxxxxxxxxx wrote on 02/19/2009 05:12:27 AM:
> Hi John,
>
> Concerning updating the eclipse.exe. I was facing the same problem
> within our proprietary software update solution and I found out that
> it is possible to:
> - first move/rename the *.exe to something like *.exe.backup with
> File.renameTo(). It is possible to do that while the *.exe is
> running and the move/renameTo is in the same folder.

This is interesting, I did not realize this was possible.
The biggest reason we haven't done anything here yet is time.   We thought that updating the exe would require the exe to not be in use, and we imagined something like:
drop in a "eclipse.exe.new", have the old "eclipse.exe" recognize it somehow, and do a song and dance with multiple restarts to replace the executable.  This would have been done in native code.

However, if we can rename a running file, then it is much easier to do as you suggest and have garbage collection later (which can all be done from java).

-Andrew