开发者

How to implement autoload in a Java application

So I'm writing this JFrame application that has its own document model that can be loaded and saved to a开发者_开发百科 filepath. I'm wondering what good ways are there to make the application open the last saved file when it starts up.

Do I store last saved document filepath in a proprietary way or is there some facility in java that can handle this for me?


Why not use the Java Preferences API ?

That allows you to store settings/properties per user and/or per system. They'll be persisted automatically (via files in Unix/Linux, and in the registry in Windows, IIRC).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜