- Hudson 3 Essentials
- Lloyd H. Meinholz
- 233字
- 2021-07-21 18:00:10
Environment variables
An environment variable is a variable that stores a value that is used by an operating system or a process (application).
In this book, I will use Unix-style environment variables in examples. If you are using Windows, simply replace ${MY_VARIABLE}
with %MY_VARIABLE%
.
The method of setting environment variables is operating system dependent, but the format of creating and modifying environment variables is similar.
As an example, we will show how to add the JAVA_HOME
environment variable on both Linux and Windows operating systems. This example assumes that the JDK has been installed to ${HOME}/jdk1.7.0_25
on Linux and to C:\jdk1.7.0_25
on Windows.
To set the JAVA_HOME
environment variable in a Linux system that uses the bash shell, add the following lines to the ${HOME}/.bashrc
file:
export JAVA_HOME=${HOME}/jdk1.7.0_25 export PATH=${JAVA_HOME}/bin:${PATH}
To set the JAVA_HOME
environment variable on a Windows system:
- Right-click on My Computer.
- Click on Properties.
- Click on the Advanced tab.
- Click on Environment Variables.
- Click on New to add a new variable name.
- Enter the name:
JAVA_HOME
. - Enter the value:
C:\jdk1.7.0_25
. - Select the path variable, and click on Edit.
- Add
%JAVA_HOME%\bin
to the beginning of the value.
Setting environment variables on the Mac OS X operating system is very similar to how this is done on the Linux operating system.
- 數(shù)據(jù)庫基礎(chǔ)教程(SQL Server平臺)
- SQL入門經(jīng)典(第5版)
- 數(shù)據(jù)分析實戰(zhàn):基于EXCEL和SPSS系列工具的實踐
- 云計算服務保障體系
- 數(shù)據(jù)庫系統(tǒng)原理及應用教程(第4版)
- 數(shù)字媒體交互設(shè)計(初級):Web產(chǎn)品交互設(shè)計方法與案例
- MATLAB Graphics and Data Visualization Cookbook
- 數(shù)據(jù)科學實戰(zhàn)指南
- 區(qū)域云計算和大數(shù)據(jù)產(chǎn)業(yè)發(fā)展:浙江樣板
- 大數(shù)據(jù)數(shù)學基礎(chǔ)(R語言描述)
- Access數(shù)據(jù)庫開發(fā)從入門到精通
- Internet of Things with Python
- 中國云存儲發(fā)展報告
- 算力經(jīng)濟:從超級計算到云計算
- 大數(shù)據(jù)測試技術(shù):數(shù)據(jù)采集、分析與測試實踐(在線實驗+在線自測)