Gameclock trivia: class path

The -cp option to both javac and java tells those commands where to look for class definitions. The value .:gc.jar is a list, called a path, of places to look; it means to first look for files in the current directory (.), then to look inside the file named gc.jar.

A jar file is a way to package a bunch of compiled Java classes into a single file.

Because it is a path telling where to find classes, this is known as the class path (which explains the abbreviation as cp).


Cary Gray
Last modified: Mon Feb 21 16:23:22 CST 2011