Reputation: 3582
I've been sent a project, but all of the .Jar files have been omitted.
This might seem like a naive question, but what is the easiest way to find the correct jars for the project, and get it running on my machine?
There was no dependency management (e.g. maven) and there's no build file or anything like that. As far as I know, all of the .jar files were downloaded manually, placed in the project directory, and added to the classpath manually.
Short of getting the code owner to send me their classpath, which would be awkward, how can I find out what all the dependencies are, and how I can source the correct implementation/version of them?
Thanks for your time.
Edit: Naturally I could manually go through the imports at the top of each class, google them, find a source, download a copy and manually add it to my class path, but this seems too indeterminate and awkward to be the best solution.
Given how casually the sender left out the jar files, I'm guessing there's an easier/automated way to find them?
Upvotes: 1
Views: 151
Reputation: 39457
I would definitely ask the code owner to give me this information, otherwise it would be pain :) Sometimes I use http://jarfinder.com/ but if the project depends on 5-6 JARs that's more or less OK. If the project depends on 100 JARs, then you can spend days trying to figure these dependencies out. Also, it's possible that you find a dependency on JAR called x.jar but you will not know if you're using exactly the same version of x.jar which the code author used (was it x-0.2.jar or x-0.2.1.jar or x-0.3.jar, I mean).
Upvotes: 1