Project Kulla

Official homepage
Check out the official page on Kulla at

JEP related to Kulla

View or add your comments to the recent LJC hackday feedback by the attendees.

Download binaries
JDK9 binaries:
Kulla.jar: Adopt OpenJDK Cloudbees Build farm [dead-link]

MacOS users
If you do not want to make JDK9 as the primary Java on your MacOS, here's something to try out.

What JDK am I using ?

// Tells you which JDKs you have
$ /usr/libexec/java_home -verbose

Can I set JDK8 or JDK9 to be my default JAVA_HOME each time I log into my terminal ?

// You can set that export command in your ~/.profile
// and/or ~/.bashrc to permanently set JAVA_HOME
// for all shells/terminals/applications.
export JAVA_HOME="`/usr/libexec/java_home -v '1.8*'`"

// Set JAVA_HOME to be Java 9 for the terminal
// window you are in
export JAVA_HOME="`/usr/libexec/java_home -v '1.9*'`"

Linux/MacOS users
How can I switch between different versions of the JDK if I have multiple of them ?

Add the below to your .bashrc or .bash_profile:

export JAVA9_HOME=/path/to/jdk1.9.0
export JAVA8_HOME=/path/to/jdk1.8.0
export JAVA7_HOME=/path/to/jdk1.7.0
export JAVA6_HOME=/path/to/jdk1.6.0

function go9 {
    export JAVA_HOME=$JAVA9_HOME
    export JDK_HOME=$JAVA_HOME
    echo "Switched to $JAVA_HOME"
    export PATH="$JAVA_HOME/bin:$PATH"

function go8 {
    export JAVA_HOME=$JAVA8_HOME
    export JDK_HOME=$JAVA_HOME
    echo "Switched to $JAVA_HOME"
    export PATH="$JAVA_HOME/bin:$PATH"

function go7 {
    export JAVA_HOME=$JAVA7_HOME
    export JDK_HOME=$JAVA_HOME
    echo "Switched to $JAVA_HOME"
    export PATH="$JAVA_HOME/bin:$PATH"

function go6 {
    export JAVA_HOME=$JAVA6_HOME
    export JDK_HOME=$JAVA_HOME
    echo "Switched to $JAVA_HOME"
    export PATH="$JAVA_HOME/bin:$PATH"

Getting started

Running kulla.jar

set JAVA_HOME to point to /path/JDK9/
$ java -jar ~/sources/kulla/kulla.jar
| Welcome to the Java REPL -- Version 0.411
| Type /help for help


/help options

-> /help
Type a Java language expression, statement, or declaration.
Or type one of the following commands:


Supported shortcuts include:
<tab> -- show possible completions for the current text
Shift-<tab> -- for current method or constructor invocation, show a synopsis of the method/constructor

Slides [soon to be published]


Other mentions of REPL

Building the Kulla dev branch of OpenJDK9

hg clone kulla-dev
cd kulla-dev
bash configure --with-boot-jdk=/path/to/jdk1.8.0
make clean images
make install  <=== optional

Ensure that the path to the JDK built with the above steps is set to the JAVA_HOME and PATH environment variables.

Download JLINE2 from Maven, and set the environment variable JLINE2LIB to point to the downloaded jar file.

To compile and run Kulla, see or download this Maven pom.xml and place it in the $HOME/sources/kulla-dev/langtools/repl/ folder.

Other good guides to building Kulla from scratch, see this JClarity's post and Arun Gupta's post. And a nice and short blog post from Greg Bakos.


Clear the terminal window
Linux: Ctrl-K or Ctrl-L

results matching ""

    No results matching ""