If our Java compiled class file is not in the current directory, we can use -classpath to specify the class file directory:
C:> java -classpath C:\java\DemoClasses HelloWorl
In the above command, we used the -classpath parameter to specify The directory where HelloWorld's class files are located.
If the class file is in a jar file, the command is as follows:
c:> java -classpath C:\java\myclasses.jar
The above is a Java example - how to execute the contents of the specified class file directory (classpath). For more related content, please pay attention to PHP Chinese Net (www.php.cn)!