Date d = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd-hh-mm-ss"); String fileName= "jdbc:h2:~/"+sdf.format(d);
cp = JdbcConnectionPool.create(fileName, "sa", "sa");
常用代码块:使用时间生成数据库文件名
原文:http://www.cnblogs.com/SEC-fsq/p/5745666.html