Prerequisites
Before installing MegaDownloader, ensure you have the following installed on your system:Java 24 or higher
MegaDownloader requires Java 24 as specified in the Verify your Java installation:If you need to install Java 24, download it from the Oracle JDK website or use your system’s package manager.
pom.xml configuration:Apache Maven
Maven is required for building the project and managing dependencies.Verify Maven is installed:If not installed, download it from the Maven website.
Required External Tools
MegaDownloader relies on two external tools for downloading and processing media:Install yt-dlp
yt-dlp is the core download engine used by MegaDownloader.
- Download the yt-dlp executable from the official repository:
-
Place
yt-dlp.exe(Windows) oryt-dlp(Linux/Mac) in a known directory - Note the full path - you’ll need this during first-time configuration
The application stores this path in
config.txt and reads it using the getYtDlpPath() method from MainPanel.java:174.Install FFmpeg (Required for audio extraction)
FFmpeg is essential for extracting audio from videos and converting formats.
-
Download FFmpeg from:
- Windows: https://www.gyan.dev/ffmpeg/builds/
- Linux/Mac: Use your package manager or download from https://ffmpeg.org/download.html
-
Extract the archive and locate
ffmpeg.exeandffprobe.exe(or the non-.exe versions on Unix systems) -
Important: Place both executables in the same directory as
yt-dlp
Building the Application
Once all prerequisites are installed, build MegaDownloader from source:Compile with Maven
Compile the project and resolve dependencies:This command:
- Downloads all dependencies (FlatLaf, Jackson, custom components)
- Compiles Java sources from
src/main/java/com/borjaalmazan/entrega1_1/ - Validates the build configuration
Package as JAR (Optional)
Create an executable JAR with all dependencies:The Maven Shade plugin will create an uber-JAR at
target/megadownloader-1.0-SNAPSHOT.jar with the main class set to com.borjaalmazan.entrega1_1.Main.First-Time Configuration
When you first launch MegaDownloader, you’ll need to configure the yt-dlp path:Set yt-dlp location
- Click Edit > Preferences in the menu bar
- Click Change location button
- Navigate to and select your
yt-dlp.exefile - The path will appear in the preferences panel
Set download directory (Optional)
By default, files download to the project directory. To change this:
- In Preferences, click Change Download directory
- Select your preferred download folder
- This path is stored in
config.txtasdownloadDir:"/your/path"
The configuration file is read by
PreferencesPanel.java:127-151 on startup and persists between sessions.Manual FFmpeg Configuration
If FFmpeg is installed in a different location than yt-dlp:- Open
config.txtin a text editor - Add the FFmpeg path:
- Save and restart the application
MainPanel.java:239-250).
Verifying Installation
To verify everything is set up correctly:- Launch MegaDownloader
- Log in with your credentials
- Go to Edit > Preferences
- Confirm the yt-dlp path is displayed (not “Not configured”)
- Try downloading a test video to confirm functionality
Dependencies
MegaDownloader uses the following libraries (automatically managed by Maven):- FlatLaf 3.6.2 - Modern dark theme for the UI
- Jackson 3.0.0 - JSON parsing for API communication
- Custom MediaPollingComponent - API integration for media management
pom.xml:14-30 and downloaded automatically during the build process.

