What is the difference between Class Path and Build Path

后端 未结 6 831
名媛妹妹
名媛妹妹 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:07

    Each Java project has its own build path that specifies all dependencies required to compile the project. Those dependencies may come from other Java projects in the workspace, from Java archive .jar files, or from folders containing .class files.

    In CLASSPATH environment you need to specify only .class files (i.e., jar, zip files – Inside jar, zip files you will find only java classes) i.e. you are helping Java Virtual Machine (JVM) to find Java class files

    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 creates the file inside C:\SpringSourceTool...

    This is where the JVM was started, if you want to create the file else where, use relative path from here.

    See this and this for more info.

提交回复
热议问题