Transferred from: http://www.cnblogs.com/zhj5chengfeng/archive/2013/01/01/2841253.html
Http://www.cnblogs.com/qiyeshublog/archive/2012/01/24/2329162.html
First of all, you should have installed the Java JDK, the author installed is: jdk-7u7-windows-x64
Next the main talk about how to configure the environment variables of Java, but also for the next day I forgot to make a backup
1. Go to the "Properties" option of "Computer" and select "Advanced system Settings" as shown in:
2. When you click on "Advanced system Settings", you will see the dialog box as shown, select "Environment variables":
3. After clicking on "Environment variable", you will see the dialog box as shown:
4, the next step is the specific configuration process:
①, select "New" as shown,
"Variable name": Java_home
"Variable value": C:\Program files\java\jdk1.7.0_07
Note: the "Variable Value" column mainly fills in the path where you install Java, which may vary depending on the individual situation
②, after the previous step, select "Path" in the environment variable, as shown in:
Edit after Selection:
At the top of the "Variable Value" column, add the following code:
%java_home%\bin;%java_home%\jre\bin;
Note: The above code is best for one character, because Java_home has limited the path to your JDK, and each version of Java JDK should be made up of these things.
③, after the previous step is determined, then "new":
"Variable name": ClassPath
"Variable value":.; %java_home%\bin;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar
Note: The above code is best also a character unchanged paste up, "variable value" the most front.; Don't miss out.
After completing the three steps above, the configuration of the environment variable has been completed.
5, check the environment variables set up: Call "cmd" check
1. Input: "Java", you should see the following things:
2, enter "Javac", you should see the following things:
3, enter "Java-version", you should see the following things:
If the above three pictures are seen, congratulations, the environment variable configuration is OK!
6. Why should I configure the environment variables for Java?
Please move this blog, although it is about Linux, but Windows is the same truth
Why set the Java environment variable (detailed)
=======python===========
By default, after you install Python under Windows, the system does not automatically add the appropriate environment variables. You cannot use the Python command directly at the command line at this time.
1. First, you need to register the Python environment variable in the system: assuming that the Python installation path is c:\python2.6, modify the path in the system variable, advanced environment variable, properties----"
(in order to run the Python command in command-line mode, you need to append the directory where the Python.exe resides to the environment variable of path.) )
Path=path;c:\python26
Once the above environment variable is set up successfully, you can use the Python command directly at the command line. or execute "python *.py" to run the Python script.
2. At this point, you can still run Python scripts only through Python *.py, and if you want to run *.py directly, simply modify the other environment variable Pathext:
Pathext=pathext;. PY;. PYM
3. In addition, in the process of using Python, it may be necessary to review the help documentation for a command frequently, such as using "print" to view the instructions for use of the Print command. The default installation of Python is not able to view the help documentation, and it requires a simple configuration:
Under the Python installation directory, locate Python25.chm, using
Hh-decompile. Python26.chm
Decompile it, and then add the directory in which it resides to the PATH environment variable mentioned above.
4. How do I enable the Python interpreter to import directly from a third-party module other than the default installation path?
In order to import modules from a third party other than the default installation path (such as a module of your own), you need to create a new PYTHONPATH environment variable with the value of the directory where the module resides.
(go) Java and Python environment variable settings under Windows