This project provides a Flatpak manifest and a launcher script for running Java JAR files in a self-contained Flatpak environment. It simplifies the process of packaging and running Java applications as Flatpaks.
- Integrates OpenJDK 11 within the Flatpak environment
- Provides a user-friendly launcher script to select and run JAR files
- Isolates the Java application from the host system for enhanced security and portability
- Leverages Flatpak's sandboxing features for resource control and permission management
- io.github.overwatcheddude.flatpak_java_launcher.yml: The Flatpak manifest file that defines the application's runtime, SDK, dependencies, and permissions.
- java_launcher.sh: A shell script that prompts the user to select a JAR file and then executes it using the included OpenJDK 11 runtime.
Ensure you have Flatpak installed on your system. Refer to the official Flatpak documentation for installation instructions: https://flatpak.org/setup/
If you have Git installed, you can clone the repository using the following command:
git clone https://github.com/overwatcheddude/Flatpak_Java_Launcher.git
If you don't have Git, you can download the repository as a .zip file by clicking the "Code" button on the GitHub repository page and then selecting "Download ZIP". Ensure to extract the contents of the .zip file.
Before building, ensure you have the following Flatpak dependencies installed:
flatpak install flathub org.flatpak.Builder org.freedesktop.Platform//23.08 org.freedesktop.Sdk// runtime/org.freedesktop.Sdk.Extension.openjdk11/x86_64/23.08
Open a terminal in the project directory. Run the following command to build the Flatpak:
flatpak run org.flatpak.Builder --user --install --force-clean build-dir io.github.overwatcheddude.flatpak_java_launcher.yml
After successful build, run the launcher using:
flatpak run io.github.overwatcheddude.flatpak_java_launcher
The launcher will prompt you to select a JAR file to execute.