What is the difference between Class Path and Build Path

后端 未结 6 820
名媛妹妹
名媛妹妹 2020-11-28 18:34

I\'m confused with these two terms.

Also what should I do to create a file under the src folder of a Spring MVC Project? When I create using a File object it create

6条回答
  •  春和景丽
    2020-11-28 19:09

    The build path is used for building your application. It contains all of your source files and all Java libraries that are required to compile the application.

    The classpath is used for executing the application. This includes all java classes and libraries that are needed to run the java application. A Classpath is mandatory, the default path is . which is used if the java virtual machine can't find a user defined path. (CLASSPATH environment variable, -cp flag or Class-Path: attribute in a jar manifest)

提交回复
热议问题