While using a JAR file when a directory is specified in the classpath, the files are searched in the directory specified and not in the directories up in the hierarchy. Also, the dot (.) operator means that the files are to be searched in the current directory also. The list of the files in the Windows environment are separated using a semicolon (;).
How the classpath is searched for a JAR file syntax?
Author: Daisy WilliamsNov 19
What is a JAR file?
Author: Daisy WilliamsOct 13
A JAR file is a bundling and deploying utility that executes upon Java programs. The JAR tool is used to create a JAR file. The file contains class files, image files, and audio/video files. It also contains a manifest file, which contains information such as whether the class file is a javabean, or which class contains the main method, etc. The basic syntax of the command for creating a JAR file is as follows:
jar -cf jar-file input-file(s)
where,