Thomas:

Thank you for looking this. As you noted, I made several compromises.

I see org.h2.util.StartBrowser.openURL(String url) in the src tree but
not the Javadocs. Would it be appropriate to add a main method that
invokes openURL() in order to open a browser from the command line?

Your servers do the right thing, but the "while [ $READY -eq 0 ]"
seems to be required to prevent the browser from opening the URL
before the server is up.

Process ids are always a problem; I should probably write this in
Java! :-)

John

On Dec 26, 6:03 am, "Thomas Mueller" <[email protected]>
wrote:
> Hi,
>
> Thanks for the script! A few remarks: I like to keep the amount of
> operating system specific code minimal.
>
> > browser=safari
>
> There is already a cross-platform way to start a browser:
> org.h2.util.StartBrowser.
>
> > netstat
> > assumes default port assignments
> > getpid
> > ps
>
> I'm not sure if you can assume default ports. Also, using netstat
> alone will not guarantee it's in fact a H2 service. Maybe 'jps' would
> be more appropriate (but it requires Java 1.5). Even better would be
> if the H2 would detect itself what PID is has and announce it (with
> the port number of course) in a cross platform way (maybe in
> .h2.server.properties), similar to how jps works.
>
> > start
> > while [ $READY -eq 0 ]
>
> This should not be required. The servers already wait until they are
> ready (see WebServer.isRunning).
>
> Regards,
> Thomas
>
> On Fri, Dec 19, 2008 at 9:49 PM, trashgod <[email protected]> wrote:
>
> > Here's a handy H2 control script I use on Mac OS X and Linux:
>
> > <http://sites.google.com/site/trashgod/h2script>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to