Online visitors

People learning around the world

Online

—

Active in the last 10 minutes

Online visitors by country Circles show approximate country locations. The country list provides the visitor counts.

Circles represent countries, not exact visitor locations.

Country

Online

Loading country activity…

    Difference Between Path and Classpath

    Java Programming Tutorials


    Path and Classpath look similar but is a big difference between them.

    What is Path in Java?

    Once you installed Java on your machine, it is required to Set the PATH environment variable to conveniently run the executable (javac.exe, java.exe, javadoc.exe, and so on) from any directory without having to type the full path of the command, such as:

    C:\javac TestClass.java

    Otherwise, you need to specify the full path every time you run it, such as:

    C:\Java\jdk1.7.0\bin\javac TestClass.java

    What is Classpath?

    Classpath is system environment variable used by the Java compiler and JVM.
    Java compiler and JVM is used Classpath to determine the location of required class files.

    C:\Program Files\Java\jdk1.6.0\bin

    See Java installation to know more about How to set the path in Windows and Linux.

    Difference between path and classpath

    path classpath
    path variable is used to set the path for all Java software tools like javac.exe, java.exe, javadoc.exe, and so on. classpath variable is used to set the path for java classes.

    difference between path and classpath



    Found This Page Useful? Share It!
    Get the Latest Tutorials and Updates
    Join us on Telegram

    Notifications

    Updates are enabled for this browser.

    Receive new tutorials, articles and learning resources. You can turn updates off anytime.

    Test browser code

    Use this code in admin to send a test notification to this browser.