A simple full-stack weather application built using pure Java (HttpServer) and a frontend with HTML, CSS, and JavaScript.
- Search the weather by city
- Real-time weather data using Open-Meteo API
- Lightweight Java backend (no frameworks)
- Clean frontend UI
- Java (HttpServer)
- HTML, CSS, JavaScript
- REST API (Open-Meteo)
src/ # Java backend
web/ # Frontend files
javac src/*.java -d out
java -cp out App
http://localhost:8080
- Add weather icons
- 5-day forecast
- Better UI/UX
- Use JSON library (Gson)
GET /api/weather?city=Colombo
Example response:
{
"city": "Colombo",
"country": "Sri Lanka",
"latitude": 6.93,
"longitude": 79.85,
"updatedAt": "2026-03-18T10:30",
"temperatureC": 30.2,
"feelsLikeC": 36.0,
"humidity": 74.0,
"windSpeedKmh": 12.6,
"precipitationMm": 0.0,
"weatherCode": 2,
"condition": "Partly cloudy"
}- This project uses only core Java, so no Maven or Gradle is required.
- Internet access is needed at runtime because the app fetches live weather data.
Developed by Kavindu Dissanayaka Madushan
© 2026 Kavindu Madushan. All rights reserved.