
JAR stands for the Java Archive. Usually these file format is not only used for archiving and distribution the files, these are also used for implementing various libraries, components and plug-ins in java applications. JAR file is the compressed file format that is based on the popular ZIP file format. Jar files helps you to reduce the file size and collect many file in one by compressing files. The size of a jar file would be very less compared to the basic java classes. So, developers who develop redistributable java classes, compress them as jar file. In Andriod project development or any project development, we try to use as many reusable components as we could without developing from scratch. These Jar files help you to get the API’s that you may want to use in your projects without writing a single line of code. During my development, the most common jar file that I have used is “gson” jar that is used for parsing json files. Here is the process you can link a jar file to your project. o Right click on the project. Go to Build path -> Configure Build path o Go to Java build path and click on the Libraries tab. Click on “Add External JARs” o Browse to the downloaded jar file and click Open. o Click OK and you are done Once you are done, you can use all the java classes that are included in the Jar file and their functionality.
Discussion Threads