+ 1
what is different between classpath and path in java environment variable ?
i am confused with classspath and path and both are working same then what is different between both in practicaly
2 Answers
+ 7
javac and java commands are in the "bin" folder of your java installation directory.
If you don't want to type the path to the bin directory every time you compile or run your java program, you have to set the Java Path in the system variables so that your Operating System knows already where to find commands like "javac" or "java".
class path is the location of the java class you made.
+ 2
the path represents the java native files like predefined functions from jdk and jre and class path represents the user defined files ( classes defined by user ) like using packages . The java command first check the classes and methods in path environment.