So now it look like this ->
String baseDir = "path_where_to_store_databases"; -> I dont know where I have to use it as argument
String[] args
= {
"-tcp",
"-tcpPort", Integer.toString(8888),
"-baseDir", baseDir,
"-tcpDaemon",
"-tcpAllowOthers"
"-ifExists" // do not create new databases
};
serverH2 = Server.createTcpServer(args).start();
String database = "my_database";
String params = ";IFEXISTS=TRUE;MODE=MySQL"; // mimic mysql.
String url = "jdbc:h2:tcp://" + host + ":" + port + "/" + database + params;
conn = DriverManager.getConnection(url); -> I think that I need to use parameters that I am 'root' user
if (conn == null) {
throw new IllegalAccessException("Error in connection");
}
}
and i have data.sql scrip which is similar to this:
CREATE TABLE IF NOT EXISTS `herogame_hero` (
`ID_hero` int(11) NOT NULL,
`jmeno` varchar(255) NOT NULL,
`zivot` int(11) NOT NULL,
...
INSERT INTO `herogame_hero` (`...) VALUES
(1, 'aa', 100, 100, 50, 7, 4, 'sf', 15, 'fas', 35, 'fas', 10, 'sdaf', 50, 'OBR1', 'mag', 'mag'),
and I need to run this script to fill empty database - am I right ? I look at that link you send but i dont know how to use it
I googled and found this http://www.h2database.com/javadoc/org/h2/tools/RunScript.html?highlight=run%2Cscrup&search=run%20scrup but the same problem
i dont know how to use it 
EDIT:
I found this
INIT=RUNSCRIPT FROM 'classpath:scripts/create.sql'"
so my params would look like this
String params = ";IFEXISTS=TRUE;MODE=MySQL;INIT=RUNSCRIPT FROM 'classpath:scripts/create.sql'";
Am I right when I think that this create new database with scripts in create.sql ( it database exist nothing gonna happen ) and it is ? But I still dont know how my program detect if the database already exist.