/ Published in: Java
This Java program is used to start an H2 in memory (RAM) database (http://www.h2database.com) and start a tcp server so that other processes can read and write data to the in memory database through a TCP connection.
Expand |
Embed | Plain Text
import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; import java.sql.Connection; import java.sql.SQLException; import org.h2.tools.Server; public class StartH2Morningstar { try { Class.forName("org.h2.Driver"); try { stmt.executeUpdate("CREATE TABLE test_table( test_val VARCHAR(10) )"); Server server = Server.createTcpServer().start(); } } }
You need to login to post a comment.
