Cuelogic Blog Icon
Cuelogic Career Icon
Home > Blog > All > Creating JAR file in android

Creating JAR file in android

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.

Creating Jar-1

Step 3. Select jar option below ‘Java’ folder.Click ‘next’.

Creating Jar-2

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.

Click “Next”.

Creating Jar-3

Step 5. If we have not created manifest file then generate manifest file and save in workspace, else select existing manifest file.

Creating Jar-4

Creating Jar-5

Step 6. Select main class from java project.Then click on finish.

Creating Jar-6

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.

Creating Jar-7

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.