代码:
DatasourceConnectionInfo connInfo = WorkspaceUtil.createConnInfo(filePath); datasource = workspace.getDatasources().open(connInfo);