Question about Java

JohnCU

Banned
Dec 9, 2000
16,528
4
0
We have to implement a BTree in Java, and a bunch of us are using a SortedVector to help with this. The teacher said we could implement someone else's SortedVector as long as we give credit to that person and provide him a copy of the package. So, how do I get a copy of, say, this package, and how do I import it into my program, like I do import java.util.Vector or whatever? How would I do that for an external package?
 

Softballslug

Senior member
Feb 22, 2000
397
0
0
The package must be visible in your classpath. Once that is available you should use the
normal import.bla.bla to gain access to it...
 

Kilrsat

Golden Member
Jul 16, 2001
1,072
0
0
You would need to have downloaded the source or .class files from the other site, put them in the appropriate folders, make sure that they are available in the classpath through one method or another, and then do the import statement.

The javadocs are not the source/.class files, so just having access to them doesn't tell you that you have everything you need.