the args could be something like :
int port = 7778;
String baseDir = "path_where_to_store_databases";
String args =
when you start the server, it's done. connecting to the server is done the same way you would connect a mysql server from java.
before doing that, it's good to test if you can connect at all. which IDE do you use? as mentioned, it probably comes with a buildin tool which can connect databases.
to create a new database, you simple connect it. if the database is not existing, it will be created by the server. then it's empty.
once connected you can issue all the usual
create table ...; select * from ...; etc etc
or you have a .sql file written before and load it into the database : http://www.h2database.com/html/grammar.html?highlight=SOURCE_DATA_TYPE&search=source#runscript
if you're used to mysql - this grammar is a bit more strict. it's basically sql99 standard. http://en.wikipedia.org/wiki/SQL:1999
tho' if you connect using jdbc : http://www.h2database.com/html/tutorial.html#connecting_using_jdbc
you can pass a few hints to the server http://www.h2database.com/html/features.html#compatibility
a simple jdbc url could look like
String host = "localhost";
int port = 7779;
String database = "my_database";
String params = ";IFEXISTS=TRUE;MODE=MySQL";
String url = "jdbc:h2:tcp://" + host + ":" + port + "/" + database + params;
after connecting this, you should see a
file under the