0

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.

Maddy
  • 67
  • 1
  • 12

3 Answers3

0

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

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

Bhushan Bhangale
  • 10,921
  • 5
  • 43
  • 71
0

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

nikhil sharma
  • 326
  • 3
  • 11
  • hai thanks for reply but those 2 zip files contain lots of folders and jars. Can you tell me which file to add? – Maddy May 09 '13 at 08:47
  • The suggestion would be to add all the jars present in the folder because somewhere down the line you would be requiring. Also some the jars have dependency on other jars so its better to add all the jars. – nikhil sharma May 09 '13 at 09:01
  • That was helpful... Also "add jars to the lib folder of your project present at WEB-INF/lib" didnt get where to add didnt find WEB-INF/lib. – Maddy May 09 '13 at 09:15
  • If the folder is not there create a folder under "WEB-INF" – nikhil sharma May 09 '13 at 09:38
  • You got it wrong..Im telling I didnt find WEB-INF folder!!! Where exactly it is situated? – Maddy May 09 '13 at 09:58
  • Is it a j2SE application or Web Application? If it is a core java application there is no need to place the jar in lib and If it is a Web application WEB-INF will be in the root folder of the application. – nikhil sharma May 09 '13 at 10:09
0

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

izht
  • 130
  • 1
  • 11