encyclopegia.org

Classpath

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.

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. D:\myprogram>set CLASSPATH=D:\myprogram D:\myprogram>java org.mypackage.HelloWorld The rule is that -classpath option, when used to start the java application, overrides the CLASSPATH environment variable. If none are specified, the current working directory is used as classpath. This means that when our working directory is D:\myprogram\ (on Linux, /home/user/myprogram/ ), we would not need to specify the classpath explicitly. When overriding however, it is advised to include the current folder "." into the classpath in the case when loading classes from current folder is desired. The same applies not only to java launcher but also to javac, the java compiler.

References

No reference rows published for this article.

Cite this article

MLA

"Classpath." encyclopegia.org, 2026, https://encyclopegia.org/wiki/classpath. Accessed 24 November 2026.

Chicago

"Classpath." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/classpath.

APA

encyclopegia.org. (2026). Classpath. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/classpath

Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON

Related articles

Military mascot

enwiki · references available

Rogers High School (Toledo, Ohio)

enwiki · references available

The Colony High School

enwiki · references available

2006 European Aquatics Championships

enwiki · references available

Aviation High School (California)

enwiki · references available

Mattakkara

enwiki · references available
CC BY-SA 4.0 · share-alike · https://en.wikipedia.org/w/index.php?oldid=1356813882 · 0.5 · snapshot enwiki-001356813882

Cite · JSON · Search

Related services and records

Services

  • Estate — measured countries, lanes and facts
  • Intel — live corroborated events
  • Legal — statutes, cases and citations
  • Encyclopedia — articles with inline sources
  • Space — launches, satellites and orbits
  • Search — federated search and reports
  • Pass — passport account and SSO
  • Corpora — read-only corpus origins
  • e01 — self-hosted corpora and tools

Text and metadata only; each target carries its own sources. Missing data is published as no-data, never estimated.