Quality Testing

Quality is delighting customers

Need clarification about "Environment variable


#1. Could you please clarify that why we need to configure the Environment variable?

There are two variable

1. User variables

2. System variables

#2. Is there possible to differentiate both variables

#3. Could you please confirm whether we need to define JAVA_HOME, path, classpath


Balaji Purusothaman

Views: 256

Reply to This

Replies to This Discussion

We define variables, so that we can use their value at any place. If value changes we don't need to change everywhere only change the variable at one place. Same thing is with environment variables, we define them, so that we can use them everywhere without hard coding the value everywhere. Path variable has great significance.

User variable is user specific while system variables are for all users on the system.

Whether we need JAVA_HOME: Some software's assume you have defined JAVA_HOME into the system. This has the value where your java is installed. If you define it you don't need to hard code your java path everywhere.

Classpath is defined for java classpath the libraries which required for compiling java code. you can also define classapth into command line (-cp) for javac command. path is used to define your executable directories. i.e your java is installed at c:/xyc/java7/bin/java location, now you want to call javac method if you define the java path into path variable you don't need to use complete path to call javac method.


Environment variable is something we can assign value to the variable which can be used across the script. Where as normal variables are limited to single action.

In Environment variables there are two types

> Built-In :

like Operating System,OS version,Windows Username..etc

> Use-Defined :

We can define any variable which we wants to use across the script.

I think if you know concept of global variables its same as environment variable.

When you define user defined variable in your script it acts like global variable. That means use it anywhere.

Whereas Built in variable  is something QTP provides , and further can be used by user in different ways.


TTWT Magazine





© 2021   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service