The method is declared like this:
public static Server createTcpServer(String... args)
This means it expects an indefinite number of arguments of the class String.
You can do this:
Server server = Server.createTcpServer("-tcpAllowOthers", "true");
Or this:
Server server = Server.createTcpServer("-tcpAllowOthers", "true",
"-tcpPort", "9092");
Or this:
Server server = Server.createTcpServer("-tcpAllowOthers", "true",
"-tcpPort", "9092", "-baseDir", "D:/directory of the db");
But you can also send an array as argument, as in:
String args[] = {"-tcpAllowOthers", "true", "-tcpPort", "9092", "-baseDir",
"D:/directory of the db"};
Server server = Server.createTcpServer(args);
But you can't send a variety of arguments in just one String, as in:
String tcpArgs = "-baseDir E:\data -tcpAllowOthers -tcpDaemon";
tcpServer = Server.createTcpServer(tcpArgs);
On Tue, Feb 15, 2011 at 11:43 AM, Jogi <[email protected]> wrote:
> Just changed from the one string argument like in my example to the
> args Array in yours, and it works. Whats is the differance beetween
> them?
>
> many thanks.
>
> --
> 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.
>
>
--
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.