Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.h2.tools.Server;
- ...
- // start the TCP Server
- Server server = Server.createTcpServer(args).start();
- ...
- // stop the TCP Server
- server.stop();
- * Add h2.jar to the classpath
- * Use the JDBC driver class: org.h2.Driver
- * The database URL jdbc:h2:~/test opens the database 'test' in your user home directory
- import org.h2.jdbcx.JdbcDataSource;
- // ...
- JdbcDataSource ds = new JdbcDataSource();
- ds.setURL("jdbc:h2:˜/test");
- ds.setUser("sa");
- ds.setPassword("sa");
- Connection conn = ds.getConnection();
Add Comment
Please, Sign In to add comment