This specification defines a J2ME Optional Package that enables mobile location-based applications for resource limited devices. The API is designed to be a compact and generic API that produces information about the present geographic location of the terminal to Java applications.This API covers obtaining information about the present geographic location and orientation of the terminal and accessing a database of known landmarks stored in the terminal.http://www.forum.nokia.com/main/1,,1_0_10,00.html#jsr179

For those who don’t wish to go through the trouble and expense of dealing with a GPS receiver, the source code for this article includes a Java class file (HttpReader) that functions as a GPS data stream. (Listings 1–3 and the source code for this article can be downloaded from the JDJ Web site, www.sys-con.com/java/sourcec.cfm.) This class instance reads an HTML page that contains actual GPS data and returns its input stream. While this method is easier than using a GPS receiver, watching a plot of the author driving to his local grocery store is not nearly as much fun.

So act accordingly and download the code form the specified url.
Hope this helps!

Hi softengg,
I had download the Location pakage. But how to proceed further, These r the things i am having,

Sun one studio 4 update 1
J2ME tool kit 1.3 & 1.4
i had done simple application using the Sun one, but i read the readme file in the download, which says that we need MIDP2.0 and may other things, How to proceed further
plz tell me!!!

i am having a doubt, the mobile phone does't have any location provider, i such device as u told alread,
>>
For those who don’t wish to go through the trouble and expense of dealing with a GPS receiver, the source code for this article includes a Java class file (HttpReader) that functions as a GPS data stream. (Listings 1–3 and the source code for this article can be downloaded from the JDJ Web site, www.sys-con.com/java/sourcec.cfm.) This class instance reads an HTML page that contains actual GPS data and returns its input stream. While this method is easier than using a GPS receiver, watching a plot of the author driving to his local grocery store is not nearly as much fun.

in the application i am connecting to the server and the code for it is give,
>>
String URI = "http://xspsoft:8080/GPS.html";
HttpConnection inputCon = (HttpConnection) Connector.open(URI);
InputStream is = inputCon.openInputStream();

ok now i am testing it using PC, so how the server know me? and how it send my locaction to me??
is there any identification ??
and when i deploy this application in to a cell phone then how it works? how it identify the cell phone and its location??

Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…