|
| 1 | += Camel JBang Launcher |
| 2 | + |
| 3 | +*Available as of Camel 4.13* |
| 4 | + |
| 5 | +This module provides a self-contained executable JAR that includes all dependencies required to run Camel JBang without the need for the JBang two-step process. |
| 6 | + |
| 7 | +The launcher uses Spring Boot's loader tools to create a self-executing JAR with a nested structure, similar to Spring Boot's executable JARs. This provides better performance and avoids classpath conflicts compared to traditional fat JARs. |
| 8 | + |
| 9 | +== Downloading |
| 10 | + |
| 11 | +You can download the `camel-launcher` JAR from https://repo1.maven.org/maven2/org/apache/camel/camel-launcher/[Maven Central]. |
| 12 | + |
| 13 | +== Using the fat-jar directly |
| 14 | + |
| 15 | +Then you can run the JAR using standard Java as follows: |
| 16 | + |
| 17 | +[source,bash] |
| 18 | +---- |
| 19 | +java -jar camel-launcher-<version>.jar [command] [options] |
| 20 | +---- |
| 21 | + |
| 22 | +For example: |
| 23 | + |
| 24 | +[source,bash] |
| 25 | +---- |
| 26 | +java -jar camel-launcher-<version>.jar version |
| 27 | +java -jar camel-launcher-<version>.jar run hello.java |
| 28 | +---- |
| 29 | + |
| 30 | +== Using the distribution (recommended) |
| 31 | + |
| 32 | +Extract the distribution archive: |
| 33 | + |
| 34 | +[source,bash] |
| 35 | +---- |
| 36 | +unzip camel-launcher-<version>-bin.zip |
| 37 | +# or |
| 38 | +tar -xzf camel-launcher-<version>-bin.tar.gz |
| 39 | +---- |
| 40 | + |
| 41 | +And then use the provided scripts: |
| 42 | + |
| 43 | +[source,bash] |
| 44 | +---- |
| 45 | +# On Unix/Linux |
| 46 | +./bin/camel.sh [command] [options] |
| 47 | +
|
| 48 | +# On Windows |
| 49 | +bin\camel.bat [command] [options] |
| 50 | +---- |
| 51 | + |
| 52 | +== Benefits of using Camel Launcher |
| 53 | + |
| 54 | +- No need for JBang installation |
| 55 | +- Single executable JAR with all dependencies included |
| 56 | +- Faster startup time (no dependency resolution step, on-demand class loading) |
| 57 | +- Better memory usage (only loads classes that are actually used) |
| 58 | +- Avoids classpath conflicts (dependencies kept as separate JARs) |
| 59 | +- Each self-executing JAR is its own release, avoiding version complexity |
| 60 | +- Can still be used with JBang if preferred |
| 61 | + |
| 62 | +== More Information |
| 63 | + |
| 64 | +See the general xref:camel-jbang.adoc[Camel JBang] documentation. |
0 commit comments