I am introducing you to what is PATH
variable ?
PATH is an environment variable on Unix-like operating systems, DOS, OS/2, and Microsoft Windows, specifying a set of directories where executable programs are located. In general, each executing process or user session has its own PATH setting.
On POSIX and Unix-like operating systems, the $PATH variable is specified as a list of one or more directory names separated by colon (:) characters
On DOS, OS/2, and Windows operating systems, the %PATH% variable is specified as a list of one or more directory names separated by semicolon (;) characters.[3]
Note : The above is an excerpt from WIKI
For Windows, you can set the path
SET PATH=%PATH%;%MINGW_HOME%\bin;%JAVA_HOME%\bin
For Unix-like operating systems, you can do
SET PATH=%PATH%;\home\%MINGW_HOME%\bin;\home\%JAVA_HOME%\bin