【发布时间】:2018-01-19 18:09:45
【问题描述】:
也许这是一个愚蠢的问题,但我是数据库新手,我不知道该怎么做。
我使用以下代码行连接到位于我的 D: 驱动器中的数据库。如果数据库位于项目文件夹内,我该如何更改它以便连接到数据库? (我使用 netbeans IDE)
Connection conn = DriverManager.getConnection("jdbc:sqlite:d:\\Databases\\DataBase1.db");
//I don't want an exact path, I need it so it works idependetly of where the project folder is located
【问题讨论】:
-
貌似可以在Eclipse中设置相对路径stackoverflow.com/questions/31611785/…