Documentation Index
Fetch the complete documentation index at: https://flox-robinbrantley-containers.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Build with Flox
Not only can you develop your software with Flox, but you can build it as well. See the builds concept page for more details.Manifest builds
This example will use Gradle and the shadowJar plugin, though a number of build systems exist in the Java ecosystem. The core of building a Java artifact with Flox looks like this:- Bundle the application into a JAR
- Place the JAR into
$out/lib/ - Create a script that calls
java -jar <path to jar>, where<path to jar>is the path to the jar in$out/libat runtime, where$outis not set.
$out is not set at runtime, the script that calls java -jar <path to jar> needs to find the location of the JAR at runtime.
Note that pwd will return the location from which the built artifact is run, not the location of the artifact itself, which is why the script goes through the process of setting SCRIPT_DIR and JAR_PATH.