1,redis安装及服务器启动,可参考http://blog.csdn.net/nohackcc/article/details/19012207
2,下载redis java客户端,官网客户端有很多http://redis.io/clients,我下载了官方推荐的jedis,源码:https://github.com/xetorthio/jedis,编译后版本:https://github.com/xetorthio/jedis/downloads
3,eclipse导入jedis.jar
4,新建一个java工程,导入jedis
Jedis jedis = new Jedis("localhost"); jedis.set("foo", "bar"); String value = jedis.get("foo");