1.7 How To Set Path in Java
1.7 How To Set Path in Java
Introduction:
In this article, you will learn, how we can set path for Windows, Linux, UNIX in Java.
We already know, set path is important, because when path is not set, it gives an error and our program
is not run at that time. When we use javac and java commands, our system does not know about them.
Due to this, it’s required to set the path.
Set the path in Linux, which is as same as setting the path in Windows. The only difference is that in
Linux, we use export rather than set such as-
export PATH=$PATH:/home/jdk1.6.01/bin/.
Summary
Thus, we learnt, how to set the path on temporary basis and on permanent basis in Java. You also learnt,
how to set the path in Linux, UNIX.