public static void main (String[] args) throws Exception
{
// register the driver
String sDriverName = "org.sqlite.JDBC";
Class.forName("org.sqlite.JDBC");
Connection conn = null;
conn = DriverManager.getConnection("10.51.0.235///home/shashank/Downloads/org.sqlite.JDBC");
}
这里“10.51.0.235”是在Ubuntu上运行的vm的ip地址,而我正在使用的数据库是SQLite。