How to edit PATH variable on Mac
Posted by Alberto - 23/05/09 at 10:05:19 pmIf you need to change your PATH variables (or another environment variable, as CLASSPATH) on a Mac OS X, you need to edit a file called .profile located in your home directory. Open a terminal window and type:
open -e ~/.profile
In case you dont have a .profile file, you have to create it:
touch ~/.profile
You have to include a line like this:
export PATH=(path-you-want-to-add):$PATH
For example, lets imagine you want to add the file whatever.jar, located in your Documents folder. You would write:
export PATH=~/Documents/whatever.jar:$PATH
Easy, isnt it?
1 Comment »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds.
Valid XHTML and CSS.



Thanks a lot! You saved me a lot of time and trouble. In a few lines, you explained what other sites using entire pages had failed to explain.
Comment by Ali — August 8, 2009 #