Java will -classpath option add or replace CLASSPATH environment variable

classpath, environment-variables, java, jvm, jvm-arguments

Solution

Using the classpath variable it overrides the CLASSPATH of Environment variable but only for that session. If you restart the application you need to again set the classpath variable.

Problem

Will the use of `-classpath` option with `java` add to or replace the contents of the `CLASSPATH` environment variable?

Original source