A classpath variable lets you define a location on your system, and later use that variable to define the locations of JAR files. Where this helps is that if you are working on a team with other developers, each developer could have his or her JAR files located in diverse places, yet you can all easily share the same projects.
For example, on my Windows system at home I have my local
Maven repository at d:/opt/m2_repo. Within Eclipse I define a classpath variable, M2_REPO, and set it to "d:/opt/m2_repo". Then when I want to include the commons loggin JAR in my app's classpath, I add it as "${M2_REPO}/common-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar". At work, my local Maven repository is located at f:/opt/m2_repo. So there I set the classpath variable M2_REPO to "f:/opt/m2_repo". Then I can easily use the same project at home or work because the project uses the classpath variable, and not the hard-coded name.
Similarly, my coworkers can use the same project without change by properly setting M2_REPO for their environment. Even when running on Linux, it still works fine - there I set M2_REPO to "/opt/m2_repo".
I find this feature so handy that I use it all the time. In fact, I curse Eclipse every time it demands a hard-coded directory file name (for example, when locating javadocs or source code) and wonder why this ability to use user-defined locations is not available for every setting.