Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find weather using Java

I was wondering if there is a way to find the weather of specific town/city using Java. I have heard of Google Weather API but that has not yielded any results. I also have heard about using an .xml feed for finding the weather but where can I find that? Therefore, I have two questions, Is there a way to find the weather to find using Java and am I correct about the .xml?

like image 737
Jeel Shah Avatar asked Sep 17 '12 14:09

Jeel Shah


2 Answers

The Google Weather API appears to be no more:

http://thenextweb.com/google/2012/08/28/did-google-just-quietly-kill-private-weather-api/

But you can use others such as

http://www.wunderground.com/weather/api/

Once you have your XML (or JSON) you can parse it as described here:

Using Java to extract data from google Weather API

like image 138
davek Avatar answered Oct 20 '22 18:10

davek


you can use openweathermap api for this. Go to this link and download api and you can also see some examples to use it http://openweathermap.org/api

like image 3
Gursharan Singh Avatar answered Oct 20 '22 19:10

Gursharan Singh