umesh
umesh

Reputation: 63

Create External Jar Files

I have created a library project which can be used as reference project in any application. Now i want to create jar file of that library project so that instead of referencing the library project,i can add that created external jar file to build path and can use the library project component.Is there any way in eclipse to do so???

Upvotes: 3

Views: 1126

Answers (3)

deepa
deepa

Reputation: 2494

yes, You can do it in Eclipse...

//Exporting project to jar file

Right Click the desired project->Export the project->Choose java->jarFile->Select the project to the export and choose the destination for the jar file to be saved->Click finish-> jar file will be created in desired destination

//Including jar file

Again Right Click the project(where jar file to be included)->Choose Properties->Select the java build path->add External jar->choose the jar file->jar file will be included.

Upvotes: 1

K_Anas
K_Anas

Reputation: 31466

JAR file using Eclipse IDE

Creating JAR file using Eclipse IDE is pretty much easy. Follow the simple steps. Right click on your project, which you want to create a JAR file of. And select Export from the context menu.

enter image description here

Select JAR file from Java folder and click Next.

enter image description here

Provide the Destination path and click on Finish to create the JAR.

Here how to add JAR to your project, you can also create libs folder and drag an drop your jar inside this folder

Upvotes: 5

mkbsc
mkbsc

Reputation: 107

You will need to export that project in eclipse. here are the steps: 1) right click the project in project explorer view. 2) click on exprot and type jar. 3) select the jar option and by giving appropriate name click on export.

The jar file will be created which u can use by adding it in the build path of another project.

Upvotes: 3

Related Questions