我想以编程方式启动 HSQLdb 服务器。我创建了一个如下所示的可运行文件,然后在线程中启动它。
Runnable hsqlRunnable = new Runnable() {
public void run()
{
HsqlProperties props = new HsqlProperties();
props.setProperty("server.database.0", "file:C:\Documents and Settings\BThirup\Application Data\Rockwell Automation\FactoryTalk ProductionCentre\logs\ApplicationLog\mydb;shutdown=true;");
props.setProperty("server.dbname.0", "xdb");
org.hsqldb.Server server = new org.hsqldb.Server();
try {
server.setProperties(props);
} catch (Exception e) {
return;
}
server.start();
}
}
我收到错误消息:[Thread[HSQLDB Server @4db602,6,main]]: Shutdown because there are no open databases
谁能帮忙指出我哪里出错了。
谢谢你帮助巴拉