C # settings and environment variables
1 Introduction
Originally want to take the school room of Android Editor glued directly onto their computer use and found that it is the eclipse
32, and my 64-bit JDK, I think of two altogether installed JDK, C # to do with the ability to change a ring
Environment variable program
2. Code
Static method in class Environment
Environment variables:
public static string GetEnvironmentVariable(string variable, EnvironmentVariableTarget target);
Parameters:
// variable:
// environment variable name.
//
// target:
One // System.EnvironmentVariableTarget value, location, environment variables.
Set the environment variable:
public static void SetEnvironmentVariable(string variable, string value, EnvironmentVariableTarget target);
Parameters:
// variable:
// environment variable name.
//
// value:
// variable value to be assigned to.
//
// target:
One // System.EnvironmentVariableTarget value, location, environment variables.
PS: This method of setting environment variables without restarting the computer can take effect! (If not the third parameter will only modify environment variables for the current process)