π ATM Simulation System is a Java-based application that simulates the functionalities of an Automated Teller Machine (ATM). The system allows users to perform various transactions like withdrawals, deposits, balance checks, and more, through a Graphical User Interface (GUI). This project aims to provide a practical demonstration of object-oriented programming and Java Swing for GUI development.
The ATM Simulation System offers a user-friendly interface where users can interact with the system using a card number and PIN. It provides essential ATM operations, including:
- Withdrawals: Withdraw money from your account.
- Deposits: Deposit money into your account.
- Balance Inquiry: Check the balance of your account.
- Account Statements: Request statements for your transactions.
- User Authentication: Secure login and registration process.
- Graphical User Interface (GUI): Built with Java Swing, the system provides an interactive and intuitive user experience.
- User Authentication: Includes secure sign-in and sign-up processes.
- Email Notifications: Notifies users of successful transactions and account activities via email.
- Persistent Storage: Saves user data and transaction history to files for easy management.
Here are some screenshots of the ATM Simulation System:
The project was developed using IntelliJ IDEA, a popular integrated development environment (IDE) by JetBrains. IntelliJ IDEA offers powerful features such as:
- Smart Code Completion: Provides relevant code suggestions based on context.
- Built-in Version Control: Integrates with Git, GitHub, and other version control systems.
- Robust Debugging Tools: Helps with identifying and fixing errors efficiently.
- Cross-Platform Support: Available on Windows, macOS, and Linux.
IntelliJ IDEA was chosen for its comprehensive support for Java development, intelligent code assistance, and seamless integration with external libraries.
- Java Development Kit (JDK) 8 or higher
- IntelliJ IDEA or any other Java IDE
- The following external libraries must be included in the classpath:
activation-1.1.jarjavax-mail-1.6.2.jar
-
Clone the Repository:
git clone https://github.com/YOUR_GITHUB_USERNAME/atm-simulation-system.git cd atm-simulation-system -
Open the Project: Open the project in IntelliJ IDEA.
-
Add External Libraries:
- Download
activation-1.1.jarandjavax-mail-1.6.2.jar. - Add these libraries to your project's classpath.
- Download
-
Run the Project: Execute the
Main.javafile to start the ATM simulation.
This project includes an email notification feature implemented using the JavaMail API. To enable email notifications or configure a different email provider, update the email credentials used by the application.
The email credentials are defined in EmailService.java.
- Open
EmailService.java. - Locate the following line:
this("your-email@example.com", "your-email-password"); - Replace:
your-email@example.comwith your Gmail address.your-email-passwordwith a Gmail App Password.
For security reasons, do not use your main Gmail password. Instead, use a Google App Password.
Prerequisite: 2-Step Verification must be enabled on your Google account.
- Visit myaccount.google.com/security.
- Under How you sign in to Google, enable 2-Step Verification.
- Complete the verification process.
- Go to myaccount.google.com/apppasswords.
- Sign in to your Google account.
- Select:
- App: Mail
- Device: Other (Custom) β enter a name (e.g., JavaMail)
- Click Generate.
- Copy the generated 16-character app password.
Update the constructor with your new credentials:
this("your-email@gmail.com", "abcdefghijklmnop");
| Property | Value |
|---|---|
mail.smtp.host |
smtp.gmail.com |
mail.smtp.port |
587 |
mail.smtp.auth |
true |
mail.smtp.starttls.enable |
true |
Important
- Never use your primary Gmail password in the code.
- Never commit credentials to version control (use
.gitignorefurther). - Use environment variables for production environments.
- Revoke the app password immediately if it is compromised.
- Ensure 2-Step Verification is fully enabled.
- Work or school Google accounts may restrict the creation of app passwords.
- Try logging out and signing back in to your Google account to refresh settings.
- App passwords are application-specific.
- Revoking an app password immediately disables email access for that specific instance.
- Compatible with standard JavaMail configurations.
Got it π β the issue is formatting, not content. Below is plain text Markdown with NO code fences around the whole thing, so you can select + copy normally.
Just copy everything you see.
This project is a plain Java application (no Maven or Gradle) and is compiled and executed using the command line.
External libraries are stored in the exLib directory.
src/
βββ Main.java
βββ EmailService.java
βββ OTPManner.java
βββ ChangePIN.java
βββ Deposit.java
βββ ...
βββ exLib/
β βββ activation-1.1.jar
β βββ javax.mail-1.6.2.jar
Navigate to the src directory:
cd src
Compile all Java source files and include external libraries:
javac -cp "exLib/*" *.java
Note: You may see warnings about deprecated APIs. These do not prevent the program from running.
After successful compilation, run the main class:
java -cp ".:exLib/*" Main
.refers to the current directoryexLib/*includes all external JAR filesMainis the entry-point class
- Make sure you are inside the
srcdirectory - Ensure
Main.javacontains amainmethod - Recompile before running
-
Confirm JAR files exist inside
exLib -
Compile using:
javac -cp "exLib/*" *.java
Create a file named run.sh inside the src directory:
#!/bin/bash
javac -cp "exLib/*" *.java && java -cp ".:exLib/*" Main
Make it executable:
chmod +x run.sh
Run the project:
./run.sh
- Java Swing: For building the GUI.
- JavaMail API: For handling email notifications.
- Java AWT: For additional GUI components.
- Java IO: For handling input/output operations.
- Java Util: For utility classes like ArrayList and HashMap.
This project is licensed under the MIT License. See the LICENSE file for more details.
Yash Kayastha
Feel free to contribute to the project by forking the repository and submitting pull requests. For major changes, please open an issue first to discuss what you would like to change.




