类路径和构建路径之间有什么区别 [英] What is the difference between Class Path and Build Path

查看:251
本文介绍了类路径和构建路径之间有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对这两个术语感到困惑。

I'm confused with these two terms.

另外,我应该怎么做才能在Spring MVC项目的src文件夹下创建文件?
当我使用File对象创建它时,它在C:\ SpringSourceTool中创建文件...
我想这是ClassPath吧?

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... I guess this is ClassPath right?

如何获取 applicationcontext 文件夹或应用程序的根目录?

How can I get the applicationcontext folder or root of the application whatever?

推荐答案

构建路径用于构建应用程序。它包含编译应用程序所需的所有源文件和所有Java库。

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.

类路径用于执行应用程序。这包括运行java应用程序所需的所有java类和库。 Classpath是必需的,默认路径是,如果java虚拟机找不到用户定义的路径,则使用该路径。 ( CLASSPATH 环境变量, -cp flag或 Class-Path: jar清单中的属性)

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)

这篇关于类路径和构建路径之间有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆