I am using linux slitaz. and i ve installed the java 1.6.17. and now i ve to set path for environment variable. how to do this , can anyone give solution???
我正在使用linux slitaz。我已经安装了java 1.6.17。现在我要设置环境变量的路径。怎么做,谁能给出解决方案???
3 个解决方案
#1
0
Just set it:
只需设置它:
$ export MY_ENV_VAR=foo
#2
0
bash: export PATH=$PATH:/the/path/you/want
csh or tcsh: setenv PATH $PATH:/the/path/you/want
If you don't know what path you're using, try: echo $SHELL
and this will tell you.
如果你不知道你正在使用什么路径,请尝试:echo $ SHELL,这将告诉你。
NOTE: The $PATH
allows you to just append your new path to the current one. That way you don't lose your current path.
注意:$ PATH允许您将新路径附加到当前路径。这样你就不会失去当前的路径。
#3
0
If you are using bash, then in your ~/.bash_profile
, add the following line:
如果您正在使用bash,那么在〜/ .bash_profile中,添加以下行:
export PATH=$PATH:/usr/java/latest/bin
Or wherever you installed Java.
或者无论你在哪里安装Java。
#1
0
Just set it:
只需设置它:
$ export MY_ENV_VAR=foo
#2
0
bash: export PATH=$PATH:/the/path/you/want
csh or tcsh: setenv PATH $PATH:/the/path/you/want
If you don't know what path you're using, try: echo $SHELL
and this will tell you.
如果你不知道你正在使用什么路径,请尝试:echo $ SHELL,这将告诉你。
NOTE: The $PATH
allows you to just append your new path to the current one. That way you don't lose your current path.
注意:$ PATH允许您将新路径附加到当前路径。这样你就不会失去当前的路径。
#3
0
If you are using bash, then in your ~/.bash_profile
, add the following line:
如果您正在使用bash,那么在〜/ .bash_profile中,添加以下行:
export PATH=$PATH:/usr/java/latest/bin
Or wherever you installed Java.
或者无论你在哪里安装Java。