how to set path? permanently [SOLVED]
hey all,
i just installed jdk6 and i want 2 set the path permanently. coz every time i wanna call java i have to type the entire path. also would this help firefox to be able to call java runtime Environment (JRE)? thanks |
You can set the path environment in your .bash_profile. This only affects you and not other users. If you want a system wide path, which all users have the path, then add it to /etc/profile
|
Quote:
# include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi ----------- so do i just add # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" PATH =${PATH}:/Java's dir fi thanks |
You need to add something that similar to below
Code:
export PATH=$PATH:/path/to/java/bin |
Quote:
but it was temporary, when i restarted it was gone. i also tried editing in bash_profile # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" PATH =${PATH}:/Java's dir fi it didn't help. I kubuntu fresh and when i type "$PATH" it brings me /home/avd/mono-1.2.3.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games: No such file or directory why do i have no such file or directory? |
YEEPEE!!!
I got it!!! # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi PATH="${PATH}":~/jdk1.6.0/bin |
All times are GMT -5. The time now is 07:04 AM. |