You can use a text file for this but it is difficult. You cannot just insert into the middle of a file, nor can you just delete. You will end up rewriting the entire file out again.
I think this should be possible with random access files.
You may find it easier to use a 100% Java DB embedded into your application like HSQLDB I've used it before and it is very easy.
Latest version of JDK comes with a database which should simplify database developments. But i am not sure if JRE includes it too.