There is a wiki page http://wiki.apache.org/db-derby/DerbyWindowsService which talks about couple possible ways of running programs as windows service. I have not tried it myself but you may find the wiki page useful.
There is also a Jira entry http://issues.apache.org/jira/browse/DERBY-187 "Starting derby network server as a service in Win OS". The issue has not been closed but again, you may find some pointers there.

On 9/13/07, digi_pixel <napperley@gmail.com> wrote:

What options are there to distribute derby with a standalone application?

I have written an application that uses the network database (not the
embedded one). What I would like to avoid is forcing a non technical user to
manually start the Derby Network Server, can the server be installed as a
service in Windows so that it starts automatically when the user logs in??
View this message in context: http://www.nabble.com/Distributing-Derby-Database-tf4440081.html#a12668295
Sent from the Apache Derby Users mailing list archive at Nabble.com.