# Syntax for the derbyrun.jar file

The `derbyrun.jar` file is a special JAR file that simplifies how you invoke the Derby tools and the Network Server.

With the `derbyrun.jar` file, you can run the Derby tools and utilities using shortened names and you do not need to set the java CLASSPATH environment variable. The `derbyrun.jar` file must be in the same folder as the other Derby JAR files.

## Syntax

The following table shows the syntax for using `derbyrun.jar` for each of the Derby tools.

Table 1. Syntax for using `derbyrun.jar`
Operating System | Command
--- | ---
UNIX (Korn Shell) | `java -jar $DERBY_HOME/lib/derbyrun.jar ij [-p propertiesfile] [sql_script]` `java -jar $DERBY_HOME/lib/derbyrun.jar sysinfo [-cp ...] [-cp help]` `java -jar $DERBY_HOME/lib/derbyrun.jar dblook [arg]*` (or no arguments for usage) `java -jar $DERBY_HOME/lib/derbyrun.jar server [arg]*` (or no arguments for usage)
Windows | `java -jar %DERBY_HOME%\lib\derbyrun.jar ij [-p propertiesfile] [sql_script]` `java -jar %DERBY_HOME%\lib\derbyrun.jar sysinfo [-cp ...] [-cp help]` `java -jar %DERBY_HOME%\lib\derbyrun.jar dblook [arg]*` (or no arguments for usage) `java -jar %DERBY_HOME%\lib\derbyrun.jar server [arg]*` (or no arguments for usage)

To see this syntax reminder, run the command `java -jar derbyrun.jar` with no arguments.

## Additional information

You cannot use the `-cp` argument or the CLASSPATH environment variable to set CLASSPATH variables when you are using the `-jar` argument to start the `ij` tool. If you want to run the `ij` tool with a custom classpath, you cannot use the `-jar` argument. Instead, you have to use the full class name to start the `ij` tool (`java org.apache.derby.tools.ij`). In addition, you cannot use any of the module-aware command line switches such as -p, -m, and --add-modules.

See Manually setting the CLASSPATH/MODULEPATH environment variables for more information about setting up the classpath and running the `ij` tool.

There is no such limitation when you run the `sysinfo` tool. See Running sysinfo for more information on running the `sysinfo` tool.

The `server` argument is a shortcut for running the `NetworkServerControl` tool. For details on using this tool, see the Derby Server and Administration Guide.

For more information on using `derbyrun.jar` to run the `ij`, `sysinfo`, and `dblook` tools, see the Derby Tools and Utilities Guide.

## Including derbyrun.jar in your CLASSPATH

Alternatively to using the `derbyrun.jar` jar file with the `-jar` argument, you can instead use the `derbyrun.jar` jar file with the `-cp` argument or in your CLASSPATH environment variable.

When you use this technique, adding the `derbyrun.jar` jar file to your CLASSPATH has the effect of including all of the Derby classes in your classpath. For more information on this use of `derbyrun.jar`, see the Derby Server and Administration Guide.

Parent topic: Setting up your environment