Simple unit converter web app built with HTML and Java.
Java Unit Converter is a simple web application that can convert between different units of measurement. It can convert units of length, weight, volume, area, temperature, and more. The user can input a value and select the units to convert from and to. The application will then display the converted value. This project is designed to explore and practice logic building and working with the HTML and server in Java.
- HTML
- CSS
- Java 21.0.6 LTS
- Maven 3.9.9
- Jakarta Servlet 6.1.0
This app can convert between different units of measurement for length, weight, and temperature. Supported conversions include:
-
Length:
- millimeter (mm)
- centimeter (cm)
- meter (m)
- kilometer (km)
- inch (in)
- foot (ft)
- yard (yd)
- mile (mi)
-
Weight:
- milligram (mg)
- gram (g)
- kilogram (kg)
- ounce (oz)
- pound (lb)
-
Temperature:
- Celsius (°C)
- Fahrenheit (°F)
- Kelvin (K)
To run this web app, you’ll need:
- Java: Version 21 or higher
- Maven: Version 3.x
- Apache Tomcat: Version 11.0.0-M20
How to install:
-
Clone the repository
git clone https://github.com/krisnaajiep/java-unit-converter.git
-
Change the current working directory
cd java-unit-converter
-
Build the project
mvn clean package
-
Copy the WAR file from the target/ directory to the webapps folder in your Apache Tomcat directory
cp target/java-unit-converter-1.0-SNAPSHOT.war path/to/tomcat/webapps/unit-converter.war
-
Run the Apache Tomcat and access the URL
http://localhost:8080/unit-converter
-
Select one of the units of measurement in the navigation menu.
-
Input a value to convert.
-
Select the units to convert from.
-
Select the units to convert to.
-
Select the
Convert
button. -
View the converted value.
Project is: complete.
This project was inspired by roadmap.sh.
This project is licensed under the MIT License—see the LICENSE file for details.