This document describes how to

Feel free to make changes to this document.

Access the repository from the command line interface

Since version 2.1, jcr-commands (contrib) has been integrated to JackRabbit Standalone (

So, Jackrabbit standalone may be used to run in an interactive mode and allow the admin to change the repository.

This feature is most valuable to allow the admin to create new workspaces, add specific nodes and others easily.

To execute Jackrabbit standalone in interactive mode, it may be executed specifying parameter -i or --cli.

For example:

java -Xmx256m -jar jackrabbit-standalone-2.2.4.jar --cli file:///scratch/jcr/repository

Notice that the parameter --cli accepts a valid URI to access the repository. It invokes JcrUtils.getRepository(URI) from jackrabbit-commons to get the access to the repository. See the documentation of this method in jackrabbit-commons for more detail.

See the documentation of the repository implementation you want to use for whether it supports this repository URI convention and for what the repository URI should look like. For example, Jackrabbit 2.0 supports the following types of repository URIs:




The next examples are valid:

java -Xmx256m -jar jackrabbit-standalone-2.2.4.jar --cli jndi:jcr/Repository

After executing standalone with --cli parameter, you may execute jcr commands in an interactive mode. Execute


to list the available commands and

  help [command]

for details in a specific command.

For example, you may execute the following commands:

Login using the user and password in the repository:

login user password

create an additional workspace1 workspace:

createWorkspace workspace1

InteractiveCommandLine (last edited 2011-05-04 18:30:05 by 186)