0

I'm trying to add jReddit (https://github.com/jReddit/jReddit) to my project as a library but I don't know how. There's no setup tutorial on the ReadMe of the GitHub page and I have no git experience. How do you add this to a java project in Eclipse? Thank you!

EDIT: Posting this edit so that people in the future can know the solution to this question. All you have to do is download the jReddit jar from the Maven link Anubian Noob posted below. Once you have done that you also have to download the two other jars the jReddit jar depends on, and those are the junit jar and the json-simple jar.

Andrei Sfat
  • 8,440
  • 5
  • 49
  • 69
user3648245
  • 142
  • 7

1 Answers1

5

The easiest way to do this would be to download the Jar.

First, you need to download the jar. Go to the Maven Repository website and click "Download (JAR)."

Now, go to Eclipse. Right click on your project, click properties (or Alt-Enter), go to Java Build Path -> Libraries -> Add External JARs. Add the JAR you downloaded. Now you can start using jReddit!

What Maven is from the Maven site:

Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.

Anubian Noob
  • 13,426
  • 6
  • 53
  • 75
  • 1
    Wow, thank you so much!! I'm literally grinning from ear to ear now that it works! Although I do have one question. How did you know you could find a jar at the Maven site? And what exactly is Maven? I've seen quite a few projects on GitHub refer to it. – user3648245 Jun 04 '14 at 01:03
  • @user3648245 Wow, it's rewarding to help people. I'm literally grinned from ear to ear now. I'll edit my answer to include more stuff about Maven, and meanwhile if this works, you should accept it to help future visitors. – Anubian Noob Jun 04 '14 at 01:05
  • @user3648245 Glad I could help! Good luck with your project. As a side note, I suggest you open source it on [GitHub](http://github.com). [jReddit](https://github.com/karan/jReddit) is on GitHub too, [as am I](https://github.com/anubiann00b). – Anubian Noob Jun 04 '14 at 01:23
  • I'm running into a problem when I try to run the example code on the jReddit GitHub. I get these errors in eclipse: Multiple markers at this line - Line breakpoint:Reddit [line: 11] - main(String[]) - The method submitLink(String, String, String) from the type User refers to the missing type ParseException - The type org.json.simple.parser.ParseException cannot be resolved. It is indirectly referenced from required .class files – user3648245 Jun 04 '14 at 01:26
  • @anubian_noob I was trying to run the "submit a link and self post" code snippet on the jReddit GitHub. – user3648245 Jun 04 '14 at 01:26
  • Why should I open source it? I don't have much experience working with GitHub. A lot of the terminology confuses me. – user3648245 Jun 04 '14 at 01:27
  • @user3648245 You're code is throwing an exception... I'll invite you to a chat, we can talk there, one sec... – Anubian Noob Jun 04 '14 at 01:28
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/55027/discussion-between-anubian-noob-and-user3648245). – Anubian Noob Jun 04 '14 at 01:29