how to add a path variables in linux

C++
export PATH=/usr/java/<JDK Directory>/bin:$PATH.
Source

Also in C++: