Like-CP and-classpath, it is the path to the other classes that the specified class runs on, usually the class library, the jar package, and the full path to the jar package, the semicolon ";" JAVA-CP on the window. Myclass.jar Packname.mainclassname
The jar file in the classpath can use wildcards, and if it is multiple jar files, it should be listed one by one, and in a sense the jar file is the path.
To specify a specific storage path for each jar file, multiple wildcard characters can be used for the same path
JAVA-CP.; C:\classes\myclass.jar;d:\classes\*.jar packname.mainclassname java jar can be executed via Java jar Log.jar [parameters] Http://www.cnblogs . com/adolfmc/archive/2012/10/07/2713562.html an executable jar of the MANIFEST.MF file inside the specified run Manclass
manifest-version:1.0
Class-path:.
Main-class:my.hadoop.hdfs.createlog.createlog
In a package exported with Maven, if the dependency package is not hit in the Pom file, there is no dependency on the package
1, the main class is specified when packing, can be used directly with Java-jar Xxx.jar
2, packaging is not specified main class, you can use JAVA-CP Xxx.jar main class name (absolute path)
3, to refer to other jar packages, you can use Java-classpath $CLASSPATH: Xxxx.jar main class name (absolute path)
-CLASSPATH specifies the classes to be introduced;
The Hadoop jar adds all of the jar packages that Hadoop relies on when executing the Java CP without a manual add-on effect
JAVA-CP command java jar command and Hadoop jar command