PDA

View Full Version : Windows classpath/path<>Ubuntu classpath/path



hoboy
October 12th, 2008, 08:10 AM
In windows you have the path notion where you put can put your xxx.exe to be excute, and you have classpath where you put xxx.jar for window to find, what/where is the corespondent to these files in ubuntu ?
in case I want to manually set a classpath, or a path to a file ?

dwhitney67
October 12th, 2008, 08:26 AM
The PATH environment variable provides information to the shell as to where to locate executable programs. If you want to augment this variable, do so in your ~/.bashrc file. For example:

export PATH=$PATH:/some/dir/path

For Java, the CLASSPATH environment variable is used. It works similarly to the PATH variable; in other words, it is defined and set in the same manner.

P.S. PATH and CLASSPATH do not necessarily have to be set in ~/.bashrc. They can be temporarily set within a script.

hoboy
October 12th, 2008, 08:55 AM
The PATH environment variable provides information to the shell as to where to locate executable programs. If you want to augment this variable, do so in your ~/.bashrc file. For example:

export PATH=$PATH:/some/dir/path

For Java, the CLASSPATH environment variable is used. It works similarly to the PATH variable; in other words, it is defined and set in the same manner.

P.S. PATH and CLASSPATH do not necessarily have to be set in ~/.bashrc. They can be temporarily set within a script.

Where is located ~/.bashrc ? in ubuntu ?

dwhitney67
October 12th, 2008, 08:57 AM
Where is located ~/.bashrc ? in ubuntu ?

The ~ character is short-hand notation (understood by the bash shell) for /home/userid, where userid is your particular userid.

Thus whenever you need to reference your home directory, while typing in a terminal, use the ~.

geirha
October 12th, 2008, 01:03 PM
And putting a . infront of a filename or directoryname, will make it hidden in linux. To see hidden files in Nautilus, use Ctrl+H to toggle showing them, in the terminal you can pass the -a option to ls to show them.
ls -a ~