The HR Management System is a comprehensive CLI application developed in Java, utilizing MySQL for database management. It enables HR professionals to perform CRUD operations, efficiently managing employee details within the database. The system allows HR to seamlessly add, update, retrieve, and delete employee information.
Additionally, the application includes functionality for taking attendance and granting leave, streamlining HR processes and ensuring accurate record-keeping. This feature simplifies the management of employee attendance and leave requests, making HR operations more efficient.
Overall, this application enhances the efficiency of HR operations, promoting organized and effective management of employee data, attendance, and leave. It contributes to a more productive and well-managed workforce, ensuring that HR tasks are handled with ease and precision.
- Java
- MySQL
To run a Java program with JDBC connectivity to MySQL, follow these steps:
-
Install Java Development Kit (JDK):
- Ensure JDK is installed and configured. Verify by running:
java -version
- Ensure JDK is installed and configured. Verify by running:
-
Install MySQL:
- Install MySQL Server and ensure the database and tables required for the program are set up.
-
Download MySQL JDBC Driver:
- Download the MySQL Connector/J from the MySQL website.
- Save the JAR file (e.g.,
mysql-connector-java-8.x.x.jar) in an accessible directory.
- Open your MySQL client and create the database and tables. Example:
CREATE DATABASE HRMS; USE HRMS;
Import the sql file from the directory using the command line:
mysql -u username -p HRMS < path_to_sqlfile/hrms.sql
Replace username with your MySQL username and path_to/hrms.sql with the path to the SQL file.
- Place the
mysql-connector-java-8.x.x.jarfile in your project directory.
- Use the following command to compile the program:
Replace
javac -cp .;path_to_mysql_connector/mysql-connector-java-8.x.x.jar HRMS.java
path_to_mysql_connectorwith the path to the JDBC driver.
- Use the following command to run the compiled program:
java -cp .;path_to_mysql_connector/mysql-connector-java-8.x.x.jar HRMS
- Replace
localhost,3306,testdb,root, andyour_passwordwith your MySQL server details. - Handle exceptions appropriately to debug issues.
- Ensure the
mysql-connector-javaJAR file is correctly referenced in your classpath.
- Database Connectivity Issues: Verify the database URL, username, and password.
- Driver Not Found: Ensure the MySQL Connector/J is included in the classpath.
- JDBC URL Format: Ensure the format is correct:
jdbc:mysql://hostname:port/dbname.
- Fork the repository.
- Create a new branch:
git checkout -b feature-name. - Make your changes.
- Push your branch:
git push origin feature-name. - Create a pull request.
This project is licensed under the MIT License.