

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the difference between PATH and CLASSPATH in Java?
Before running Java programs on your machine you need to set two environment variables namely,
PATH − The path environment variable is used to specify the set of directories which contains executional programs.
When you try to execute a program from command line, the operating system searches for the specified program in the current directly, if available, executes it.
In case the programs are not available in the current directory, operating system verifies in the set of directories specified in the ‘PATH ’ environment variable.
CLASSPATH − The class path environment variable is used to specify the location of the classes and packages.
When we try to import classes and packages other that those that are available with Java Standard Library.
JVM verifies the current directly for them, if not available it verifies the set of directories specified in the ‘CLASSPATH’ environment variable.
- Related Questions & Answers
- How to Set PATH and CLASSPATH in Java?
- What is the difference between Java and Core Java?
- What is the difference between Java and Java EE
- What is the difference between Java and JavaScript?
- What is the difference between /* */ and /** */ comments in Java?
- Difference between Test-Path and Resolve-Path in PowerShell?
- What is the difference between transient and volatile in Java?
- What is the difference between compositions and aggregations in Java?
- What is the difference between abstraction and encapsulation in Java?
- What is the difference between Serialization and Deserialization in Java?
- What is the difference between System.out.println() and System.out.print() in Java?
- What is the difference between Vector and ArrayList in Java?
- What is the difference between ArrayList and LinkedList in Java?
- What is the difference between replace() and replaceAll() in Java?
- What is the difference between String.valueOf() and toString() in Java?