Setting Environment Variables For Java In Mac

Setting Environment Variables For Java In Mac 5,0/5 9774 reviews

Yes that is what I meant by a GUI app. Setting environment variables for GUI app's in OS X 10.8 appears to be quit difficult. Some apps let you define environment variables, which are to be passed to other applications, in their preferences for example.

I have always difficulties setting the Environment variables in OS X like JAVA_HOME, M2_HOME or PATH. How to set these on OS X Mavericks? I did some research but the answers I've found didn't really help me yet: • export JAVA_HOME=/.

(But it seems that the changes are temporary, just for one terminal session.) • setenv JAVA_HOME=/. (But command not found.) • Open.profile and write the variables inside to make the changes permanent- (.profile does not exist). • Open.bash_profile and write the variables inside to make the changes permanent- (.bash_profile does not exist). • vi ~/.bash_profile (Quite a challenge for somebody who doesn't know vi.) • Creating your own enrivonment.plist file.

Can somebody please walk me through the steps to get that to work on OS X Mavericks, assuming no Unix knowhow? I have a.profile in my home directory; it contains many export statements for environment variables. You can create such a file by opening a Terminal and issuing the command touch.profile Close Terminal. Then you should open that file in a plain-text editor (TextWrangler for example).

Samsung scx 3405fw printer software for mac mac. You can also use nano.profile in a Terminal window (current directory should be your home), which is much easier than vi. Insert lines such as export JAVA_HOME=. Save, exit nano if you used that and quit a running Terminal.

Open Terminal and issue the command env to see all environment variables. Check that the ones you defined have the value you assigned to them.

For

You should be good to go now. But don't forget that environment variables defined in.profile are not passed to GUI applications.

OSX has had only one change re environment variables and that was in Lion where ~/.MacOSX/environment.plist was removed. Although there also has been a change in the default shell in 10.2 or 10.3 from tsch to bash. You need to define what you want the enviroment variable set for and what environment you have. You also need to understand shells and Unix which by your comments you have not fully done. There are several nbash tutorials around.

As to your points • You understand correctly assuming you are in a sh type shell (e.g. Bash or zsh) • This is for C shells e.g. Tcsh so won't work on recent defaults. • You need to create.profile then it works • It is.bash_profile or better.bashrc and you need to create the file first • Totally correct:) Use TextEdit or nano (or emacs) • Correct up to OSX 10.7 and the wy to do this for programs called from the Workspace e.g.