Java
Complete guide to host Java applications on Discloud.
📁 Preparing Your Project Files
Before deploying, your project must be compiled into an executable JAR file. When compressing your project, ensure that the .jar
file is placed at the root of the .zip
archive.
❌ Files to Exclude
Ensure the following files and directories are not included in your .zip
:
- package-lock.json
- node_modules/
- .cache/
- .git/
📌 Use a .discloudignore
file to automatically exclude these files.
🔗 Need help with compilation? Check the FAQ on How to Build and Package a Java Application?
📦 Compiling Your Java Application
To deploy your Java application, it must be compiled into an executable JAR file.
📄 Maven Official Documentation → https://maven.apache.org/guides/index.html
mvn clean package
Recommendation
Rename your JAR file to a simple name like app.jar
to avoid issues with special characters.
📝 Setting the Main File
The MAIN
parameter in your discloud.config
file should point to your executable JAR file. For example:
MAIN=app.jar
Ensure that app.jar
matches the name of your compiled JAR file.
Note: For detailed information on setting the main file, refer to Discloud's FAQ on the main file.
✍️ Deploying Your Applicaton
Once your project is configured and compressed, you can choose one of the following deployment methods on Discloud:
Last updated