Reputation: 5526
I need to add some files on my CLASSPATH so I am using the following command:
export CLASSPATH=$CLASSPATH:/usr/local/lib/antlr-4.0-complete.jar
Although everytime my terminal is reseted, I have to add the classpath again. Is there a way that I can permamently add the above file on classpath ?
Commands are executed on OSX.
Upvotes: 1
Views: 987
Reputation: 13088
You should edit a file called ~/.profile
and add the
export CLASSPATH=$CLASSPATH:/usr/local/lib/antlr-4.0-complete.jar
to that file. If ~/.profile
doesn't exist then create it. The file is executed each time a new shell session is started.
Upvotes: 2