views:

61

answers:

1

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?

+6  A: 

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).

Brian Agnew
Thanks this is exactly what I needed.
Spoike