Question

I am trying to get a jar file with java class provided by sfs2x to store buddy list. And having troble in importing like,

import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Please help me find these and adding those in my eclipse.

Was it helpful?

Solution

you can download the commons IO File utility jar using the link below,

http://apache.cs.utah.edu//commons/io/binaries/commons-io-2.4-bin.zip

and slf4j jar using the link,

http://www.slf4j.org/dist/slf4j-1.7.5.zip.

To add the jar to your eclipse project do, Right click on project -> Build path -> Configure Build Path -> java build path -> Libraries -> Add external jar browse the jar path and add all the jar you need. Also, add jars to the lib folder of your project present at WEB-INF/lib

OTHER TIPS

Use http://www.findjar.com/index.x to search jars for classes.

In your case you need apache commons io and slf4j jars.

Doesn't those JARs come with sfsx2? if not grab one and follow this official doc, look for Java API http://docs2x.smartfoxserver.com/GettingStarted/client-api-setup-1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top