Davtho1983
Davtho1983

Reputation: 3954

Create and import Java library in Eclipse

I have seen similar questions on SO and I'm just not getting it. I have a bunch of Java classes I need to import as a library. How do I make the jar file, save it in the right place, then tell Eclipse to import the jar file?

The classes I want in my library are here: StdIn library code

and this is the java code I want to import the library into: Sattolo algorithm code

There is a further library I would need to import to make the Sattolo algorithm run, but once I get the general idea...

I am a very, very new Java coder, so please be patient with me not understanding what must seem very basic.

Upvotes: 0

Views: 524

Answers (1)

Shai
Shai

Reputation: 26

Step 1: create a jar from you classes, if your using eclipse then simply https://www.cs.utexas.edu/~scottm/cs307/handouts/Eclipse%20Help/jarInEclipse.htm

Step 2: add the jar dependency to your eclipse project How to import a jar in Eclipse

Upvotes: 1

Related Questions