1 | initial version |
To add a class path permanently to the Mac terminal, you can follow the steps below:
cd ~
..bash_profile
by typing the command touch .bash_profile
..bash_profile
file in a text editor by typing the command open -e .bash_profile
.In the text editor, add the following line of code to set the class path:
export CLASSPATH=/path/to/class/folder:$CLASSPATH
Replace /path/to/class/folder
with the actual path of your class folder.
Save and close the file.
source ~/.bash_profile
.Now, your class path should be permanently set in the Mac terminal, and you can use the classes in your specified folder from anywhere in the terminal.