Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put a jar in classpath in Eclipse? [duplicate]

Hi I am n00b in classpath and Ant. While reading the tutorial of GCM for Android I came across a line

Step 1: Copy the gcm.jar file into your application classpath

To write your Android application, first copy the gcm.jar file from the SDK's gcm-client/dist directory to your application classpath.

I got the gcm.jar from the dist folder. Now how do I put it into my classpath using Eclipse(I think that would be easier)? And where would I make changes if I didnt have Eclipse?

Thnaks

like image 612
vincent mathew Avatar asked Jul 13 '12 02:07

vincent mathew


People also ask

How do I copy a class path in Eclipse?

Try the File System export, select only . classpath files for all the Projects you want to export and in the options select 'Create directory structure for files' to make sure each project classpath is generated in its own folder. for using this to import, just copy-paste the exported files(containing only .


1 Answers

As of rev 17 of the Android Developer Tools, the correct way to add a library jar when.using the tools and Eclipse is to create a directory called libs on the same level as your src and assets directories and then drop the jar in there. Nothing else.required, the tools take care of all the rest for you automatically.

like image 161
Barak Avatar answered Sep 28 '22 04:09

Barak