I followed the instructions here to generate the java files for Amazon’s Product Advertising API. I’m currently left with a directory tree like so…
C:.
├───build
│ └───com
│ └───ECS
│ └───client
│ └───jax
└───src
└───com
└───ECS
└───client
└───jax
…that contains .class and .java files. I had thought my understanding of Eclipse was adequate enough to complete a task like this but I can’t for the life of me figure out how to add those files as dependencies within my project.
So far I’ve tried to import as a project and create a new project from existing jars but have had no success.
How the heck do I do this?!
Right-click on the project, click “Properties”. Click on “Java Build Path”.
If you want to add pre-compiled *.class files, go to the “Libraries” tab, then use “Add Class Folder…”.
If you want to add additional source folders (containing *.java files), from the same dialog, go back to the “Source” tab, then use “Add Folder…”.
This will accomplish everything you asked for beyond your first sentence, which mentions JAR files. In order to add these (if you have them), use the “Add JARs…” button from the same “Libraries” tab as mentioned above.