<p>I have a server written in Java that runs as a Windows service (thanks to Install4J).  I want this service to be able to download the latest version of the JAR file it runs from, and start running the new code.  The stitch is that I don't want the Windows service to fully exit.</p>

<p>Ideally, I would accomplish this by a unix-style exec() call to stop the current version and run the new one.  How can I best accomplish this?</p>

As far as I know, there is no way to do this in Java.
I suppose you could work around it by using the Java
```
Runtime.exec
```
or
```
ProcessBuilder
```
's start() command (which start new processes) then letting the current one end... the docs state
The subprocess is not killed when
  there are no more references to the
  Process object, but rather the
  subprocess continues executing
  asynchronously.
I'm assuming the same is true if the parent finishes and is garbage collected.
The catch is Runtime.exec's process will no longer have valid in, out, and err streams.