There are lightweigh or embedded dbs like HSQLDB, Derby, SQLite
But like others don't understand why you need a db to store key/values...
Why not a Map?
Need to keep key/values on app reboot?
Also it's perhaps not what you need but with html5 on up to date browsers you have localStorage that permits you to store key/values in the browser using javascript.