Is it mandatory to add classpath variable in commandline . for e.g.
java -cp $CLASSPATH MyClass
I know it's mandatory if the classpath is stored in some different variable , but since CLASSPATH (the variable) is a parameter in the Java Virtual Machine, does it have to be explicity added to command line ? I am facing a issue where if i don't add the CLASSPATH variable to command line i get NoClassDef.