This simple Java application allows you to hide local files in a MySQL database.
You will need to have the following installed on your computer:
- Java (I used 21)
- MySQL Server (I used 8.0.35)
- Apache Maven
- Google-generated app password for sending emails (Not your regular google-account password)
My Development OS: Ubuntu 22.04
The following dependencies are required for this project:
- mysql-connector-java
- javax.mail
Add these dependencies to your pom.xml file:
<dependencies>
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.33</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.mail/javax.mail -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
</dependencies>
Note: Always check for the proper version of dependencies regarding your project.
- Create the database using the following SQL command:
CREATE DATABASE fileHider;
Now switch to the database:
USE fileHider;
- Create the following tables (users, data) in the database:
create table users
(
id int primary key auto_increment,
name varchar(100),
email varchar(100) unique
);
create table data
(
id int primary key auto_increment,
name varchar(100),
path varchar(255),
email varchar(100),
bin_data blob
);
- If everything is done correctly, you should be able to run and use the project.
- Clone the project to your computer
- Open the project in your IDE
- Run the "Main" class inside /src/main/java
I am Mohd Mohitur Rahaman, a tech geek pursuing a Master's in Computer Applications from KIIT, Bhubaneswar. With a deep passion for coding and a strong love for science & technology, I am dedicated to honing my skills and achieving proficiency as a developer.
Note: This project was inspired from Sheriyans Coding School YouTube channel. Video link - here