This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages)
This article relies excessively on references to primary sources. Please improve this article by adding secondary or tertiary sources. Find sources: "Classpath" – news · newspapers · books · scholar · JSTOR(November 2020) (Learn how and when to remove this message)
This article contains instructions, advice, or how-to content. Please help rewrite the content so that it is more encyclopedic or move it to Wikiversity, Wikibooks, or Wikivoyage.(November 2020)
(Learn how and when to remove this message)
Classpath is a parameter in the Java Virtual Machine or the Java compiler that specifies the location of user-defined classes and packages. The parameter may be set either on the command-line, or through an environment variable.
Contents
1Overview and architecture
2Setting the path to execute Java programs
2.1Supplying as application argument
2.2Setting the path through an environment variable
2.3Setting the path of a Jar file
2.4Adding all JAR files in a directory
2.5Setting the path in a manifest file
3OS specific notes
4See also
5References
6External links
Overview and architecture
edit
See also: Java Classloader
Similar to the classic dynamic loading behavior, when executing Java programs, the Java Virtual Machine finds and loads classes lazily (it loads the bytecode of a class only when the class is first used). The classpath tells Java where to look in the filesystem for files defining these classes.
The virtual machine searches for and loads classes in this order:
By default only the packages of the JDK standard API and extension packages are
Classpath Tutorials: In Java, the classpath tells the Java Virtual Machine where to look for user-defined classes and packages when running Java programs. The classpath is a parameter and can be set either on the command-line, or through an environment variable.
Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website.
If you are using this website then its your own responsibility to understand the content of the website