Version: 2.0
Last Updated: January 2026
Estimated Setup Time: 45-60 minutes
Download:
- Go to: https://adoptium.net/temurin/releases/
- Select:
- Operating System: Windows
- Architecture: x64
- Package Type: JDK
- Version: 17 (LTS)
- Download
.msiinstaller
Install:
- Run the downloaded
.msifile - Click "Next" through the wizard
- IMPORTANT: Check "Set JAVA_HOME variable"
- IMPORTANT: Check "Add to PATH"
- Complete installation
- Click "Finish"
Verify:
java -versionExpected output: openjdk version "17.x.x"
Download:
- Go to: https://maven.apache.org/download.cgi
- Download:
apache-maven-x.x.x-bin.zip(Binary zip archive)
Install:
- Extract ZIP to:
C:\Maven- Final path should be:
C:\Maven\bin\mvn.cmd
- Final path should be:
- Add to System PATH:
- Press
Windows Key - Type: "Environment Variables"
- Click: "Edit the system environment variables"
- Click: "Environment Variables" button
- Under "System variables", find "Path"
- Click "Edit"
- Click "New"
- Add:
C:\Maven\bin - Click "OK" on all windows
- Press
- RESTART Command Prompt (or computer)
Verify:
mvn -versionExpected output: Apache Maven x.x.x
Download:
- Go to: https://www.docker.com/products/docker-desktop
- Download: Docker Desktop for Windows
Install:
- Run installer
- Follow installation wizard
- Enable WSL 2 if prompted
- Restart computer when prompted
Verify:
- Start Docker Desktop from Start Menu
- Wait for "Docker Desktop is running" message
- Open Command Prompt:
docker --version
docker psExpected: Version info and empty container list
Download:
- Go to: https://netbeans.apache.org/download/
- Download latest version (17 or higher)
Install:
- Run installer
- Select JDK 17 as Java Platform
- Complete installation
Open Command Prompt as Administrator:
docker run -d ^
--name soft40051-mysql ^
-e MYSQL_ROOT_PASSWORD=root ^
-e MYSQL_DATABASE=cloudfs ^
-p 3306:3306 ^
mysql:8Wait 30-60 seconds for MySQL to start.
Verify:
docker ps | findstr mysqlShould show container running.
docker run -d ^
--name soft40051-file-server ^
ubuntu ^
tail -f /dev/nullCreate files directory:
docker exec soft40051-file-server mkdir -p /filesVerify:
docker ps | findstr file-serverConnect to MySQL:
docker exec -it soft40051-mysql mysql -uroot -prootYou'll see: mysql>
Copy and paste each command, press Enter after each:
USE cloudfs;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50),
password VARCHAR(255),
role VARCHAR(10)
);
CREATE TABLE files (
id INT AUTO_INCREMENT PRIMARY KEY,
filename VARCHAR(255),
owner VARCHAR(50),
version INT DEFAULT 1,
last_modified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
content_hash VARCHAR(64)
);
CREATE TABLE file_permissions (
id INT AUTO_INCREMENT PRIMARY KEY,
file_id INT,
shared_with VARCHAR(50),
permission VARCHAR(10),
FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE CASCADE
);
CREATE TABLE event_logs (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50),
event_type VARCHAR(50),
description TEXT,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE sessions (
id INT AUTO_INCREMENT PRIMARY KEY,
username VARCHAR(50) NOT NULL UNIQUE,
token VARCHAR(255) NOT NULL,
timestamp DATETIME DEFAULT CURRENT_TIMESTAMP,
INDEX idx_username (username),
INDEX idx_timestamp (timestamp)
);
CREATE TABLE file_chunks (
id INT AUTO_INCREMENT PRIMARY KEY,
file_id INT NOT NULL,
filename VARCHAR(255) NOT NULL,
chunk_index INT NOT NULL,
chunk_size INT NOT NULL,
crc32_checksum BIGINT NOT NULL,
storage_container VARCHAR(100),
chunk_path VARCHAR(500),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE CASCADE,
UNIQUE KEY unique_chunk (file_id, chunk_index),
INDEX idx_filename (filename)
);
CREATE TABLE file_history (
id INT AUTO_INCREMENT PRIMARY KEY,
file_id INT NOT NULL,
filename VARCHAR(255) NOT NULL,
version INT NOT NULL,
modified_by VARCHAR(50),
content_hash VARCHAR(64),
archived_content MEDIUMTEXT,
archived_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (file_id) REFERENCES files(id) ON DELETE CASCADE,
INDEX idx_file_version (file_id, version)
);Exit MySQL:
exitVerify tables created:
docker exec soft40051-mysql mysql -uroot -proot -e "USE cloudfs; SHOW TABLES;"Should show all 8 tables.
Option A: Clone from Repository (if available)
cd D:\NetBeansProjects
git clone [YOUR_REPO_URL] CloudFileSystem
cd CloudFileSystemOption B: Create from Scratch
cd D:\NetBeansProjects
mkdir CloudFileSystem
cd CloudFileSystemIn Command Prompt:
cd D:\NetBeansProjects\CloudFileSystem
mkdir src\main\java\com\soft40051\app\scaling
mkdir src\main\java\com\soft40051\app\security
mkdir src\main\java\com\soft40051\app\terminal
mkdir src\test\java\com\soft40051\app\auth
mkdir src\test\java\com\soft40051\app\database
mkdir src\test\java\com\soft40051\app\loadbalancerUsing NetBeans:
-
Open NetBeans
-
File Open Project
-
Navigate to:
D:\NetBeansProjects\CloudFileSystem -
Click "Open Project"
-
Add Main Source Files:
For each NEW file:
- Right-click on appropriate package
- New Java Class
- Enter class name (without .java)
- Copy-paste code from provided artifacts
NEW Files to Create:
database/DatabaseSyncService.javafiles/ConflictResolver.javafiles/FilePartitioner.javascaling/ScalingService.javasecurity/EncryptionUtil.javaterminal/TerminalService.javaterminal/RemoteTerminalService.java
Files to REPLACE (copy over existing):
database/SQLiteCache.javadatabase/DB.javafiles/FileService.javaloadbalancer/LoadBalancer.javaconcurrency/FileLock.javagui/MainApp.java
-
Add Test Files:
️ CRITICAL: Test files MUST go in
src/test/java- Right-click "Test Packages"
- New Java Package
com.soft40051.app.auth - Right-click new package New Java Class
AuthServiceTest - Copy-paste test code
Repeat for:
com.soft40051.app.loadbalancer/LoadBalancerTest.javacom.soft40051.app.database/DatabaseSyncServiceTest.java
- In NetBeans Project Files, double-click
pom.xml - REPLACE ENTIRE CONTENT with the updated pom.xml from artifacts
- Save (Ctrl+S)
Key additions in pom.xml:
- JUnit 5 dependencies
- JSch dependency (SSH)
- Maven Surefire Plugin
In Windows Explorer:
Navigate to: D:\NetBeansProjects\CloudFileSystem
Create these files:
-
Jenkinsfile (no extension)
- Right-click New Text Document
- Rename to "Jenkinsfile" (remove .txt)
- Open with Notepad
- Copy-paste Jenkinsfile content
- Save
-
docker-compose-jenkins.yml
-
docker-compose-gitea.yml
-
JENKINS_SETUP.md
-
GITEA_SETUP.md
-
IMPLEMENTATION_REPORT.md
In NetBeans:
- Right-click project "Clean and Build"
OR in Command Prompt:
cd D:\NetBeansProjects\CloudFileSystem
mvn clean installExpected Output:
[INFO] BUILD SUCCESS
[INFO] Total time: ~2 minutes (first build)
If build fails:
- Check all test files are in
src/test/java(NOTsrc/main/java) - Verify pom.xml was updated correctly
- Ensure internet connection (Maven downloads dependencies)
mvn testExpected Output:
[INFO] Tests run: 25, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
Method 1: NetBeans
- Right-click project
- "Run"
Method 2: Maven Command
mvn javafx:runExpected:
- Application window opens
- Console shows:
========================================
CloudFileSystem v2.0 - Initializing
========================================
[1/8] Initializing databases...
[2/8] Starting database sync service...
...
========================================
CloudFileSystem Ready
========================================
Default Admin Credentials:
- Username:
admin - Password:
admin
Test Steps:
- Login with admin/admin
- Navigate to "My Files"
- Create a test file
- Check "System Status" tab
- Logout
cd D:\NetBeansProjects\CloudFileSystem
docker-compose -f docker-compose-jenkins.yml up -dWait 2 minutes, then open: http://localhost:8080
Credentials: admin / admin123
See JENKINS_SETUP.md for full configuration.
cd D:\NetBeansProjects\CloudFileSystem
docker-compose -f docker-compose-gitea.yml up -dWait 1 minute, then open: http://localhost:3000
See GITEA_SETUP.md for full setup.
docker psShould show:
- soft40051-mysql (running)
- soft40051-file-server (running)
- soft40051-jenkins (optional)
- soft40051-gitea (optional)
Test each feature:
- Login/Logout
- File Create/Read/Update/Delete
- File Sharing
- System Status Dashboard
- User Management (admin only)
mvn test- All tests pass
Cause: Test files in wrong location
Solution:
- Check test files are in
src/test/java(NOTsrc/main/java) - In NetBeans, expand "Test Packages"
- If tests are under "Source Packages", move them:
- Create folders in Test Packages
- Copy files to correct location
- Delete from Source Packages
Cause: Maven not in PATH
Solution:
- Close all Command Prompts
- Re-add Maven to PATH (see Step 1.2)
- Restart computer
- Verify:
mvn -version
Cause: Docker Desktop not running or port conflict
Solution:
- Start Docker Desktop
- Wait for "Docker is running"
- Check port 3306 is free:
netstat -ano | findstr :3306
- If port in use, stop conflicting service
Cause: MySQL container not fully started
Solution:
- Wait 30 more seconds
- Check container logs:
docker logs soft40051-mysql
- Look for: "ready for connections"
- Restart container if needed:
docker restart soft40051-mysql
Cause: MySQL tables not created
Solution:
- Re-run SQL setup (Part 2, Step 2.3)
- Verify tables:
docker exec soft40051-mysql mysql -uroot -proot -e "USE cloudfs; SHOW TABLES;"
Cause: JavaFX classpath issues
Solution:
- Always use
mvn javafx:run(NOTjava -jar) - Never run JAR directly
- NetBeans "Run" button is correct
-
Delete Maven cache:
rmdir /s /q %USERPROFILE%\.m2\repository mvn clean install
-
Check Java version:
java -version mvn -version
Both should show Java 17
-
Verify all files present:
- Check FILE_LOCATIONS.txt
- Ensure no missing files
- Take snapshot of working environment
- Commit to Git (if using Gitea)
- Test all features thoroughly
- Review IMPLEMENTATION_REPORT.md for feature details
- Practice demo presentation
Run this complete test:
cd D:\NetBeansProjects\CloudFileSystem
# 1. Build
mvn clean install
# 2. Test
mvn test
# 3. Run (in separate window)
mvn javafx:run
# 4. Verify containers
docker psAll should succeed with no errors.
This project is for SOFT40051 - Advanced Software Engineering coursework.
Before Submission:
- Add your name/ID to all documentation
- Review code comments
- Test all features
- Prepare demonstration
- Check marking rubric compliance
# Setup
docker-compose -f docker-compose-jenkins.yml up -d
docker-compose -f docker-compose-gitea.yml up -d
# Build
mvn clean install
# Test
mvn test
# Run
mvn javafx:run
# Check containers
docker ps
# View logs
docker logs soft40051-mysql
docker logs soft40051-file-server
# Stop containers
docker stop soft40051-mysql soft40051-file-server
# Start containers
docker start soft40051-mysql soft40051-file-serverEstimated Total Setup Time: 45-60 minutes
Most Time-Consuming: First Maven build (downloads dependencies)
Requires Internet: Yes (for dependency download)
Can Run Offline After Setup: Yes (except CI/CD features)
For additional help, see:
JENKINS_SETUP.md- CI/CD configurationGITEA_SETUP.md- Git service setupIMPLEMENTATION_REPORT.md- Feature documentationFILE_LOCATIONS.txt- File placement guide