javajvmclasspathenvironment-variablesjvm-arguments

Java will -classpath option add or replace CLASSPATH environment variable


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


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.