Java DSL (runtime compiled)

Since Camel 3.9

The java-joor-dsl is used for runtime compiling Java routes in an existing running Camel integration. This was invented for Camel K and later ported to Apache Camel.

This means that Camel will load the .java source during startup and compile this to Java byte code as .class, which then are loaded via class loader and behaves as regular Java compiled routes.


The following source file:
import org.apache.camel.builder.RouteBuilder;

public class MyRoute extends RouteBuilder {

    public void configure() throws Exception {
                .constant("Hello Camel K!")

Can then be loaded and run with Camel CLI or Camel K.

Running with Camel K
kamel run
Running with Camel CLI
camel run

See Also