Path: In command prompt or Environment variables PATH is used to register the executable files.
Classpath: The Classpath is an argument – set either on the command-line, or through an environment variable – that tells the Java Virtual Machine where to look for user-defined classes and packages when running Java programs. While registering the jar files we need to provide the complete path in the Classpath (ex: com.ibm.db2.jcc.DB2Driver).
To know how to set the PATH and Classpath variables,please click here.
For more info on these variables, please click here.