OK. masijade gives up, but I will take a swing at it:
When you need something to be in your working environment "forever", then you do it by editing one of these two files: $HOME/.bash_profile or $HOME/.bashrc Use the first file if it exists, else the second. Use a text editor NOT a WYSIWYG editor. For instance vi or whatever programmers editor you prefer. You add one line to your .bash_profile and the line looks like this: export CLASSPATH="$CLASSPATH:/usr/java" The double quotes are important. You cannot have any spaces around the equal sign, but you can have spaces before the line, for indenting, if you want.
On the other hand, if you do NOT want your environment changed "forever" then you do NOT want to edit your .bash_profile. Instead you create a small script, say 'addjava.sourceme'. It contains the same CLASSPATH line mentioned above, but the script is not executable, so it should fail if you type addjava.sourceme on the command line. Instead, you source that file by typing this on the command line: . addjava.sourceme (Note the leading dot then a space).
Either way, you can check your environment to be sure it is correct. If you have edited .bash_profile then you must first log in again. Now, from the command line, chant echo $CLASSPATH . You will see that the last part of your CLASSPATH now is :/usr/java You possibly do not, in fact, want to alter your CLASSPATH environment variable this way, but you asked how to do it, so we have answered that question for you.
If you start with no CLASSPATH environment variable, then after the line, you have CLASSPATH=":/usr/java" because the value of an unset variable is the empty string. Try this from the command line, to understand what happens.
Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...