Whenever you have a compile-time dependency on a jar (you have to add it to the classpath when compiling), you will also need to have that jar in the classpath when you run the program.
Java never statically links code into your application.
Sometimes, a jar is not needed at compile time, but only at runtime. An example are
JDBC drivers:
you should not have the JDBC driver jar in the classpath when compiling, but only when running the program.