Purpose of environmental variables?

sai krishna
@sai-krishna-mCwaOF Oct 26, 2024

hi CEans,


can anyone pls explain me what is meant by an environmental variable?for what purpose these environmental variables(either system or user variables) used in win xp?


thanks in advance.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • Manish Goyal

    @manish-r2Hoep Sep 26, 2009

    According to my knowledge
    it is used to set the path
    of any installed software
    say u install java
    then u will set path of java compiler in it...
    by accomplish this you can treat javac as a command

  • sookie

    @sookie-T06sFW Sep 26, 2009

    In addition to Mr goyal's answer...,

    Environment variables[both user and system variables] are some strings that contain information about the environment of the system.This information is used by software programs like where to place temporary files, how to get which version of software to used at run time[Like JAVA_HOME is set in case you have many versions of Java installed in your system and you want to use some particular version then JAVA_HOME is used. This variable is also used by Tomcat to locate which Java runtime files need to be used. Similarly ANT_HOME also serves the same kind of purpose.]. Using this facility of variables, we are setting something global in our system which can then be used very conveniently at any point of time.

    Few variables are set up by system only during installation like OS, NUMBER_OF_PROCESSORS, Path etc etc.. and few are like can be set by user for their needs like Path, CLASSPATH, JAVA_HOME, ANT_HOME, J2EE_HOME etc.. etc..The one set up by system are used by our system when our computer is in running mode.

    Feel free to correct or add the information. Thanks !

  • Manish Goyal

    @manish-r2Hoep Sep 26, 2009

    thanks sookie...for this info...