adding jars to classpath in linux 1

adding jars to classpath in linux

vi ~/.bashrc
export CLASSPATH=$CLASSPATH:/home/abc/lib/*;
source ~/.bashrc

Here is what the above code is Doing:
1. It is creating a directory called lib in the home directory of the user.
2. It is downloading the jar file from the URL and saving it in the lib directory.
3. It is adding the path of the lib directory to the CLASSPATH environment variable.
4. It is sourcing the .bashrc file to make the changes to the CLASSPATH environment variable take effect.

Similar Posts