# CLASSPATH vs. MODULEPATH

Derby software can be run with either a CLASSPATH or a MODULEPATH.

With a CLASSPATH

  The simplest way to run Derby is via the CLASSPATH. That is because the CLASSPATH is used by the scripts which start Derby configurations and by the handy java -jar derbyrun.jar shorthand for booting those configurations.

With a MODULEPATH

  The MODULEPATH should be used if you want the extra security of module-level encapsulation which Java 9 introduced. In addition, the MODULEPATH should be used to reduce static footprint when assembling shrink-wrapped applications via the JDK's jlink tool.

Parent topic: Introduction to Derby