Of course!
serverPropertiesDir =* args[++i]*;
Thanks!
On Thursday, April 11, 2013 7:43:34 PM UTC+1, Thomas Mueller wrote:
>
> Hi,
>
> > server=Server.createWebServer("-properties /foldername");
>
> That's incorrect, you need to use:
>
> server=Server.createWebServer("-properties", "/foldername");
>
> Regards,
> Thomas
>
>
>
>
> On Thu, Apr 11, 2013 at 7:07 AM, Ryan How <[email protected]<javascript:>
> > wrote:
>
>> what happens if you don't put a leading / ? It would appear that it
>> would try and load it from the root if you start with a leading /, and
>> without it, it would try and load from the current working directly.
>>
>> So I'd try omitting the leading / and making sure the current working
>> directory is set correctly and try it.
>>
>> Or specify a full path name to the properties folder?
>>
>> You could always put a break point in and see what is happening
>> internally? If it is not finding the properties file, or finding it, but
>> properties are invalid, or whatever...
>>
>>
>>
>> On 11/04/2013 12:46 PM, marcolopes wrote:
>>
>> Hi Thomas,
>>
>> I'm using H2 1.3.169, and cannot start the server with the "-properties"
>> parameter.
>>
>> The server won't start (it starts ok without any parameters).
>>
>> *Here is the code*:
>> server=Server.createWebServer("-properties /foldername");
>> server.start();
>>
>> *I took a look at H2 sources, and you just process the folder and add
>> the default file name... everything looks fine to me!*
>>
>> // set the serverPropertiesDir, because it's used in
>> loadProperties()
>> for (int i = 0; args != null && i < args.length; i++) {
>> if ("-properties".equals(args[i])) {
>> serverPropertiesDir = args[++i];
>> }
>> }
>> ...
>> if ("null".equals(serverPropertiesDir)) {
>> return new Properties();
>> }
>> return SortedProperties.loadProperties(serverPropertiesDir +
>> "/" + Constants.SERVER_PROPERTIES_NAME);
>>
>> *I can't see what i'm doing wrong!*!!
>>
>> Thanks.
>>
>> On Saturday, March 23, 2013 8:14:53 AM UTC, Ben wrote:
>>>
>>> As the documentation shows the settings file ".h2.server.properties" is
>>> stored by default in the users home directory
>>> Under Window in
>>>
>>> C:\Documents and Settings\[username].
>>>
>>> Can I somehow put it into another directory (e.g. the installation
>>> directory of H2)?
>>>
>>> This would mean I have either to pass the new location as cmdline
>>> argument to H2
>>> or to setup a (new) enviroment variable like
>>>
>>> set H2CONFIG=D:\database\H2\.h2.**server.properties
>>>
>>> Among other considerations I need this to have always a portable H2
>>> version on USB Stick at hand.
>>>
>>> In best case H2 itself should have internally a search order:
>>>
>>> 1.) Users home directoryQ
>>> 2.) Own installation directory
>>>
>>> Thank you
>>> Ben
>>>
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/h2-database?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "H2 Database" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> To post to this group, send email to [email protected]<javascript:>
>> .
>> Visit this group at http://groups.google.com/group/h2-database?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
--
You received this message because you are subscribed to the Google Groups "H2
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/h2-database?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.