Java Command Line

The official documentation for the java command line is available from java, however, this is not always easy to read. A good example of a command line is this:
javaw -cp .;Retail_Utilities.jar;D:\Storage\Products\Retail\12.1\libs\* com.geoffdoesstuff.retail.RJRoleExporter
So let's break this down a bit. Firstly -cp is short for -classpath and you will note there are three items separate by semicolons. The "." means the current directory, next a specific jar file is mentioned, this will need to be in the current directory and finally the path with the \* at the end means, all the jar files in that directory. The * for all jar files was introduced with Java 6. The next item is the name of the class to launch, this should be somewhere on the classpath.
It is worth noting that if you explicitly set the classpath via the command-line then this will override the CLASSPATH environment variable.

If you wish to pass a property of value into your Java code you can use -Dkey=value, however the position of this has an impact on how it is processed. If you put it before your classpath and main class then it will be accessible, easily via System.getProperty("key") otherwise if you put it too far to the right on the command line you will need to process it manually as an argument via the args array in the main method, so via public static void main(String[] args).

There are some other command line Java options and utilities that need further explanation:
java --list-modules
jlink
jshell, type /exit to exit
These are all available after Java 8.