Berkeley DB would be the best choice probably but I can't use it due to licensing issues.
Are there any alternatives?
You can try Hazelcast. Just add hazelcast.jar to your classpath. And start coding
java.util.Map map = Hazelcast.getMap("myMap");
You'll get an in-memory, distributed, dynamically scalable data grid which performs super fast.