Jedis jedis = new Jedis("10.110.20.152", 6379); //Select the DB with having the specified zero-based numeric index. //For default every new client connection is automatically selected to DB 0. jedis.select(2); jedis.set("china", "中国"); String value = jedis.get("china"); // print result: China System.out.println(value); jedis.close();