step 1: Java JDK Installation (prefered jdk-12.0.2)
step 2: NetBeans Installation (preferred netbeans-11.0)
step 3: Project Setup
- Make a folder in D drive and rename it to “Samir”
- Paste the folder named as “project” in it from unzip folder
Step 4: Open Project
- Open netbeans64
- Click on file in menu bar
- Select open project
- Go to location D:\Samir\project\Hotel_Salon\Project1 and then click open
- Pop up will appear “Add Dependencies”
- Dependencies can be removed by providing their location.
- Click on dependency and provide location” D:\Samir\project\Hotel_Salon”
Step 5: Create Database in MySQL
- Open MySQL Workbench and enter password
- Create a new Schema named as “project_dbms”
- Select the newly created Schema “project_dbms”
- Run the sql script provide in unzip folder named as “sql_file_schema_project”
Step 6: Connect MySQL with NetBeans
- In project1 folder, right click on Libraries and then select Add JAR/Folder
- Add mysql-connector-java-8.0.18.jar (location:- D:\Samir\project\Hotel_Salon\mysql-connectorjava-8.0.18)
- Now select Services (left side)
- Right click on Databases and select New Connection (password :- mysql)
- Click next ,next, next and finish
Step 7: Enter Email Address and Password for OTP
- Open JavaMailUtil.java
- Change xxxxxx in user and password with your Email Address and password final String user="[email protected]";//sender mail id final String password="xxxxxx";//sender mail id password
- Save file
Step 8: Set up Email for sending OTP automatically
- Open any browser
- Go to “https://myaccount.google.com/lesssecureapps”
- Sign in with above entered Email Address
- Turn On “Allow less secure apps” and close the browser
- Google will send you mail to confirm your activity. Open Gmail and click on mail send by google and press check activity
- Confirm that it was done by you.
Step 9: Run Application
- Go to LoginJFrame.java
- Right click on it and press “Run File"