问题描述
您好,我编写一个简单的CRUDE应用程序,使用JSF和DB4O完美运行。
我可以添加和列出所有实体正常没有错误。
我使用这个代码持久化实体
Hello I'm coding a simple CRUDE application that runs perfectly using JSF and DB4O.I can add and list all the entities normally without errors.I've used this code to persist the entities
bd = Db4oEmbedded.openFile(configuration, "db.data");
bd.store(client);
bd.commit();
问题是我找不到db.data文件。我,在搜索整个PC,仍然找不到它。
soo其中DB4O存储那些实体,怎么可能呢?
谢谢。
the problem is that I cant locate the db.data file. I,ve done a search in the whole PC and still cant find it.soo where DB4O store those entities, how is it possible??thank you.
推荐答案
它必须在您的项目执行路径中。通常使用扩展名 yap
调用db4o文件名。您可以使用数据库文件的相对路径,例如
It must be in your project execution path. Usually db4o file name is called with extension yap
. Better you can use relative path to the database file like
String dbPath = "c:/db/project.yap"; // better read from project resource
EmbeddedObjectContainer openFile = Db4oEmbedded.openFile(dbPath);
这篇关于找不到db4o数据库文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!