+ 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

3rd Apr 2017, 9:35 AM
vinay pratap singh
vinay pratap singh - avatar
2 Respostas
+ 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.
3rd Apr 2017, 10:55 AM
seamiki
seamiki - avatar
+ 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.
3rd Apr 2017, 9:55 AM
Narayana
Narayana - avatar