I am using afreechart and edu.emory.mathcs.jtransforms
and org.afree.chart
in numerous different activities I am writing for Android. I have a tremendous amount of trouble getting each new project configured so that I can
- "See" the classes from the library as I write code in Eclipse IDE.
- See attached source for these classes
- See attached javadoc for these classes
- See the .class files for these classes when I try to run my Activity.
What I do now is make a copy of the .jar, doc src and .properties for each library I use. I copy those four things into the local lib folder for each project (one per activity) I am creating.
I must be missing something simple. It seems obvious that I should have these libraries, with their doc, src, and .properties, in one location, and that I should be able to reference that location in each project that uses those libraries. But I haven't figure out yet how to do that. Please tell me how.
If there is a way to define a set of jars and associated src & doc that will automatically and always be searched by any new eclipse project I do, that would be even better.
EDIT ADDED After answers about external Libs:
So indeed I did put jtransforms-2.4.jar in an external directory. In that same directory I put the src and doc for the package, and a file jtransforms-2.4.properties with a doc and src entry pointing at the local files with doc and src. I added them to my build path as external jar.
1) Eclipse IDE certainly found the classes in the .jar and flagged nothing as missing. 2) The doc and the src were shown as not attached. How do I put doc and src info along with the library so they automatically show up every place I link the jar as an external jar? 3) When I attempted to run the app, I got "NoClassDefFound errors for all the classes in the jar. That is, Eclipse IDE could find these classes in the external lib, but they did not make it in to the class path of the app.
SUMMARY: so the "external jar" technique has failed in two out of three important respects: 1) No src and doc show up as attached in eclipse IDE 2) do not provide updated class paths to the App.
FINALLY: when I copied the jar, .properties, doc and src in to the lib folder of my project, and removed the external jar reference, everything worked perfectly.
SO I reiterate my original question, the answers given (add to build path as external jar) did not solve anything.