The -cp
and -jar
options are mutually exclusive. Either you use -jar
, and the classpath is composed from the jar file and all the other jar files referenced in its manefest, or you use -cp
and list all the jars that must be part of the classpath.
The documentation about the -jar option says:
When you use this option, the JAR file is the source of all user classes, and other user class path settings are ignored.
So, try with
java -cp domain.jar;scanner.jar your.fully.qualified.MainClass