Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is classpath an environment variable?

 
ganapathy gopinathan
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Anyone plz, help me to know whether the 'classpath' is an environment variable?
if so, what is environment variable?

Thank u,
gopinathan
 
Peter van der Linden
author
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, classpath is typically implemented by an environment variable.

Environment variables are an "operating system thing" not a "java thing".
But they are quite like variables in a programming language.

You give a value to an environment variable using the command line interface,
and the operating system can use the variable instead of a fixed literal value.

For example, there is an env. variable called PATH in most operating systems.
It holds a string of directory names that list the places to look for executable
files when you type a command name at the command line. CLASSPATH was
name as an analogy to this.

See http://en.wikipedia.org/wiki/Environment_variable for more information.

Actually, that Wiki is a great place to search first when questions like this come
into your mind. You'll get a better answer more quickly, and if you can't find or
understand the answer you can always post a more tightly focused question here.

Cheers!

Peter
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic