Autolycus Autolycus - 5 months ago 73
Java Question

adding jar to libraries not working for redis

I am trying to add a package for redis to Java. I am very new to java and am following this tutorial with netbeans IDE

Tutorial that I am following

However when I try to build I get the following error

error: package redis.clients.jedis does not exist
import redis.clients.jedis.Jedis;

here are some screenshots that show that I have added that package

enter image description here

enter image description here

enter image description here


The *-sources.jar files do not contain compiled code, they contain the source code, to be used for debugging (mostly). To make your code work, you will need to add the proper jar to build path, in this case that would be jedis-2.1.0.jar. You can download it from here.