Tuesday, 14 March 2017

Java ClassPath

Question: What is the meaning of PATH and CLASSPATH ? How it is set in environment variable? Why we must learn it.
ANS:- Java is an OOP language. In java programming language for compiling the program we use the compiler that converts the source code into the byte code after that, that byte code is interpreted by JVM that converts the bytecode into the machine independent code.  In java how the Java compiler and the JVM use the class search path to locate classes when they are referenced by other Java code. Searching class  path is important for all Java developers.Many  development tools have their own ways of manipulating the class path, which vary from product to product.For doing this we will use only simple command-line tools to carry out the compile operations. No difference, between the way that the Java compiler searches for classes, and the way that the JVM does it at run time. The compiler has the ability to compile classes from source code, where the JVM does not.  We will use the compiler, but similar issues apply at run time.

No comments:

Post a Comment