As an android developer, many times we need to add jar file of a java project into our android project.
Below are the steps which we can follow in eclipse to create JAR file.
(using eclipse version 3.6.2)
Step 1. Right click on the project in project explorer.
Step 2. Select Export option.
Step 3. Select jar option below ‘Java’ folder.Click ‘next’.
Step 4. Select a project from the list of which we want to create jar, and select 1st and 3rd check-boxes.
Also select destination where jar will be saved.Select 1st option below destination path.
Step 5. If we have not created manifest file then generate manifest file and save in workspace, else select existing manifest file.
Step 6. Select main class from java project.Then click on finish.
Step 7. Now we have to manually add other libraries,that java project in manifest file which we have created. And follow the above steps again. But on 5th step select the existing manifest file.
Step 8. Done. Our jar file is ready at destination which we have set at step 4.
Now we are ready to include this JAR in your android project.