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
Joined: Sep 28, 2004
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.
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.
Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0131482114/ref=jranch-20" target="_blank" rel="nofollow">Just Java(TM) 2 (6th Edition)</a>