laptop-code Development Environmentchevron-right code Supported Languagesjava JavaComplete 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 :
Copy - 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 .
circle-info
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:
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:
Upload and manage your application via the web interface.
Deploy directly through Discloudโs Discord bot commands.
Integrate with VS Code for seamless project management.
Use the command-line interface for quick and efficient deployment.