java - Set classpath permanently in Linux -


I am using centos and I have 4 to 5 jar files that I want to permanently add to the cell spaces , So that I tried to do my program from anywhere -

  export CLASSPATH = "/ path / to / file: / path / to / file2"   

This was not permanently adding files when I opened a new tab and tried to compile my program, I'm getting the same error ie jar files Ta was.

Now, please help me add these jar files permanently to the classpath.

You can add that export statement at the end of your bash init file There are ~ / .bashrc , so it will be effective all the time.

By the way, there will be a better setting of CLASSPATH "$ {CLASSPATH}"

This will also preserve the initial Value of environment variable.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -