Skip to content

Cheat Sheet

Useful commands

Jeka has predefined methods that comes either from JkClass or built-in plugins.

  • jeka #help : Displays methods and options invokable from command line, along with plugins available in the classpath.
  • jeka [kbean-name]#help : Displays methods and options invokable for the specified plugin (e.g. jeka scaffold#help).
  • jeka intellij#iml : Generates iml file for Intellij. This is generated according to the dependencies declared for Jeka project.
  • jeka intellij#iml -dci : If the jeka intellij#iml fails due to compilation error on def classes, -dci forces ignore compileation error on def classes.
  • jeka eclipse#files : Same purpose as above to generate metadata files for Eclipse.
  • jeka scaffold#run : Generates files to create a basic Jeka project from scratch.
  • jeka scaffold#wrapper : Generates wrapper files (jekaw/jekaw.bat and bootstrap jar).
  • jeka scaffold#run java# : Generates files to create a Jeka project to build a JVM language project.

Useful standard options

You can add the below options to the command line.

  • -kb=[KBeanName] : By default, Jeka instantiates the first KBean found under def directory to execute methods. It can be forced to instantiate a specific class by passing its long or short name.
  • -lri : Displays runtime info which will be displayed meaningfully on the console about current Jeka version, Java version, base directory, download repository, classpath, ...
  • -lsu : Shows logs about Jeka setup (compilation of def classes, plugin loading, ...). This information is not logged by default.
  • -ls=BRACE : Alters console output by delimiting tasks with braces and mentioning the processing time for each task.
  • -ls=DEBUG : Alters console output by showing the class name and line number where the log has been emitted.
  • -lv : Alters console output by displaying trace logs (emitted by JkLog#trace).
  • -cw : Clean .work directory, forcing compilation of def classes, even if it is marked as being up-to-date.

Change the JDK that Runs Jeka

To determine the JDK to run upon, Jeka looks at, in order of priority :

  • JEKA_JDK environment variable ([JEKA_JDK]/bin/java must point on java executable)
  • JAVA_HOME environment variable

If the java version is mentionned in file (i.e., it is possible to define a property as jeka.jdk.17=/my/path/to/jdk17 in [User Home]/.jeka/ file. It can also be configured setting an os environment variable as JEKA_JDK_17=/my/path/to/jdk17.

If none of the above options is present, Jeka will run on the java executable accessible from the PATH environment.

Change the Repositories Jeka uses to Fetch Dependencies

By default, Jeka fetch dependencies from Maven central (

Another default repository can be selected by setting the property. It has been recommended to store this value in your [USER DIR]/.jeka/ file to be reused across projects.

More details can be found here.