# Running sysinfo

The Derby `sysinfo` tool displays information about your Java environment and your version of Derby.

The `sysinfo` utility prints system information to a console.

Choose the method that you will use to run the `sysinfo` script. The methods are listed in the following table.

Table 1. Methods of running the `sysinfo` utility
Method | When to Use | Command
--- | --- | ---
Run `sysinfo` as a standalone command. | Use this method if you are relatively new to the Java programming language and new to Derby. | Follow the steps in Setting the environment variables before you run the `sysinfo` utility using this method. To run the `sysinfo` script from the command line, use:
    sysinfo
The `sysinfo` script sets the appropriate environment variables, including the CLASSPATH, and runs the `sysinfo` utility.
Run `sysinfo` using the jar file that is located in the directory where `sysinfo` resides. | Use this method if you are new to Derby, but are familiar with the Java programming language. | You must set the DERBY_HOME environment variable before you can run the `sysinfo` utility using this method. On UNIX, the command is:
    java [options] -jar $DERBY_HOME/lib/derbyrun.jar sysinfo
On Windows, the command is:
    java [options] -jar %DERBY_HOME%\lib\derbyrun.jar sysinfo
Run `sysinfo` using the `java` command. | Use this method if you are familiar with both the Java programming language and Derby, and you have already added the location of the `java` executable file to your command execution PATH. | You must set your CLASSPATH. Use the steps specified in Manually setting the CLASSPATH/MODULEPATH environment variables. Then specify the class name in the `java` command. For example:
    java org.apache.derby.tools.sysinfo
Run `sysinfo` using the `java` command with a modulepath. | Use this method if you are familiar with both the Java programming language and Derby, have already added the location of the `java` executable file to your command execution PATH, and expect to run Derby via a modulepath. | You must set your MODULEPATH variable. Use the steps specified in Manually setting the CLASSPATH/MODULEPATH environment variables. Then specify the tools module and the sysinfo class name in the `java` command. On UNIX, the command is:
    java -p $MODULEPATH \
      -m org.apache.derby.tools/org.apache.derby.tools.sysinfo
On Windows, the command is:
    java -p %MODULEPATH% ^
      -m org.apache.derby.tools/org.apache.derby.tools.sysinfo

See "sysinfo" in the Derby Tools and Utilities Guide for more information about using the `sysinfo` utility.
Parent topic: Using the Derby tools and startup utilities