Header

Wednesday 4 September 2013

IGNOU BCA 4th sem Solved Assignment -Explain the significance of PATH and CLASS PATH.

Explain the significance of PATH and CLASS PATH. 
Ans

PATH and CLASSPATH are two environment variable which plays important role on Java development environment. PATH environment variable is used to locate binary or Java commands required to compile and execute Java program like javac ( java compiler) and java command must be in PATH in order to compile any Java file and run any Java program. CLASSPATH is used to find .class file which is loaded by Application ClassLoader. There are three Class loaders which is used to locate and load class files e.g. Boot Strap class loader, extension class loader and System or application class loader. out of three last class loader is responsible for loading classes from CLASSPATH in Java.
Both PATH and CLASSPATH environment variable contains list of directories where Operating System like Windows, Unix, Linux or Solaris and JVM search for Java binaries and class files. If PATH is not set means if Java binaries are not present in PATH environment variable, You will not be able to run java and javac command, you will most likey receive error

No comments:

Post a Comment