VayuCast is a modern and intuitive weather forecast application built using Java with both console and JavaFX GUI interfaces. It provides real-time weather information with detailed metrics and a visually appealing user interface. The application leverages the OpenWeatherMap API to deliver accurate weather data for cities worldwide.
- ✔ Dual Interface: Both console-based and JavaFX GUI applications for versatile usage.
- ✔ Real-time Weather Data: Fetches current weather information using OpenWeatherMap API.
- ✔ Comprehensive Weather Metrics: Temperature, feels-like temperature, humidity, pressure, wind speed, UV index, visibility, and dew point.
- ✔ Visual Weather Icons: Dynamic weather icons that change based on current conditions.
- ✔ Modern UI Design: Clean, card-based interface with attractive styling and responsive layout.
- ✔ Smart Weather Parsing: Advanced JSON parsing with calculated dew point using Magnus formula.
- ✔ Configuration Management: Secure API key handling through properties file.
- ✔ Error Handling: Robust exception management for network failures and invalid inputs.
- 📌 Programming Language: Java
- 📌 GUI Framework: JavaFX
- 📌 API Integration: OpenWeatherMap REST API
- 📌 JSON Processing: Google Gson library
- 📌 Configuration: Properties file for API key management
- 📌 Architecture: Service-oriented design with separate layers for UI, service, and data parsing
- 📌 Weather Calculations: Magnus formula implementation for dew point calculation
VayuCast/
├── src/main/java/com/vayucast/
│ ├── ConfigLoader.java # API configuration management
│ ├── Main.java # Application entry point
│ ├── WeatherApp.java # Console-based weather app
│ ├── WeatherData.java # Weather data model
│ ├── WeatherFX.java # JavaFX GUI application
│ ├── WeatherParser.java # JSON response parser
│ └── WeatherService.java # Weather API service layer
├── src/main/resources/
│ ├── config.properties # API key configuration
│ └── icons/ # Weather condition icons
│ ├── clear.png
│ ├── cloudy.png
│ ├── rainy.png
│ └── default.png
└── lib/
├── gson-2.8.9.jar # JSON processing library
├── jackson-annotations-2.15.0.jar
└── jackson-databind-2.15.0.jar
- ✔ Install JDK 11 or higher
- ✔ Obtain an API key from OpenWeatherMap
- ✔ Required libraries (Gson, Jackson - included in
lib/directory)
1️⃣ Configure API Key:
Create config.properties in src/main/resources/ with:
api_key=YOUR_OPENWEATHERMAP_API_KEY2️⃣ Add Weather Icons:
Place weather icon images in src/main/resources/icons/ directory:
clear.png- for sunny/clear weathercloudy.png- for cloudy conditionsrainy.png- for rain/drizzledefault.png- fallback icon
3️⃣ Compile and Run:
For JavaFX GUI Application:
javac -cp "lib/*" src/main/java/com/vayucast/*.java
java -cp "lib/*:src/main/java" com.vayucast.WeatherFXFor Console Application:
javac -cp "lib/*" src/main/java/com/vayucast/*.java
java -cp "lib/*:src/main/java" com.vayucast.WeatherApp- Launch Application: Run
WeatherFX.javato open the graphical interface. - Enter City: Type the name of any city in the input field.
- Get Weather: Click "Get Weather" button to fetch current weather data.
- View Details: Weather card displays comprehensive information including temperature, humidity, wind, pressure, and more.
- Run Console Version: Execute
WeatherApp.javafor command-line interface. - Enter City Name: Input the desired city when prompted.
- View Results: Weather information is displayed in the terminal.
- Temperature & Feels Like: Current and perceived temperatures in Celsius
- Humidity: Relative humidity percentage
- Pressure: Atmospheric pressure in hPa
- Wind: Speed in m/s and direction
- UV Index: Ultraviolet radiation intensity
- Visibility: Atmospheric visibility in kilometers
- Dew Point: Temperature at which air becomes saturated
The application uses OpenWeatherMap Current Weather Data API:
- Base URL:
https://api.openweathermap.org/data/2.5/weather - Parameters: City name, API key, metric units
- Response Format: JSON with comprehensive weather data
- Rate Limits: Free tier allows 1,000 calls per day
- Clean, card-based layout with rounded corners and subtle shadows
- Responsive design that adapts to content
- Color-coded elements with professional styling
- Advanced JSON parsing with error handling
- Calculated dew point using meteorological formulas
- Wind direction conversion from degrees to compass directions
- Separation of concerns with distinct service layers
- Secure configuration management
- Comprehensive error handling and logging
- 🔹 5-Day Forecast: Extended weather predictions
- 🔹 Location Services: GPS-based automatic location detection
- 🔹 Weather Alerts: Severe weather notifications
- 🔹 Historical Data: Past weather information and trends
- 🔹 Dark Mode: Alternative UI theme options
- 🔹 Multi-language Support: Internationalization capabilities
- 🔹 Weather Maps: Integration with weather map visualizations
Common Issues:
- API Key Error: Ensure
config.propertiescontains valid OpenWeatherMap API key - Network Issues: Check internet connection and firewall settings
- Missing Icons: Verify weather icon files are present in
resources/icons/ - JavaFX Runtime: Ensure JavaFX is properly configured in your Java environment
VayuCast was developed as a comprehensive weather application showcasing modern Java development practices, API integration, and user interface design. The project demonstrates clean architecture principles, error handling, and responsive UI development using JavaFX.
Hi, I'm Ankesh Kumar — a passionate developer exploring Java and UI development. This project was built as part of my journey to deepen my understanding of JavaFX, API integration, and software architecture. I'm always learning and open to collaboration or feedback!
Feel free to connect with me on:
© 2025 Ankesh Kumar.
VayuCast Weather Application — Built with ❤️ using Java & JavaFX.



