Contrast amongst way and classpath in Java

Contrast amongst way and classpath in Java:

Way

Way variable is set for give way to all java apparatuses like java, javac, javap, javah, container, appletviewer. In Java for run any project we utilize java instrument and for assemble java code use javac apparatus. These all devices are accessible in receptacle organizer so we set way upto container envelope.

Classpath

Classpath variable is set for give way of all java classes which is utilized as a part of our application. All classes are accessible in lib/rt.jar so we set classpath upto lib/rt.jar.

Difference between path and classPath

pathclasspath
path variable is set for provide path for all java tools like java, javac, javap, javah, jar, appletviewerclasspath variable is set for provide path of all java classes which is used in our application.

JDK Folder Hierarchy

Path variable is set for use all the tools like java, javac, javap, javah, jar, appletviewer etc.

Example

“C:Program FilesJavajdk1.6.0bin”

Every one of the apparatuses are available in receptacle organizer so we set way upto container envelope.

Classpath variable is utilized for set the way for all classes which is utilized as a part of our system so we set classpath upto rj.jar. in rt.jar record all the .class documents are available. When we decompressed rt.jar record we get all .class documents.

Example

“C:Program FilesJavajre1.6.0jrelibrt.jar”

In above rt.jar is a jar file where all the .class files are present so we set the classpath upto rt.jar.