Redis Java调用package com.stono.redis; import redis.clients.jedis.Jedis; public class RedisJava { public static void main(String[] args) { Jedis jedis = new Jedis("localhost"); System.out.println("ok"); System.out.println("ping "+jedis.ping()); } }