classpath和sourcepath之间的区别? [英] difference between classpath and sourcepath?

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

问题描述

我对classpath和sourcepath有这种困惑。我也提到了这些链接
但是我没有把它弄好。
REFERENCES -

I have this confusion regarding the classpath and sourcepath.I have referred to theselinks too but i aint getting it right. REFERENCES--

关于自动重新编译,我无法发现javac的-classpath和-sourcepath选项之间的区别

这是否意味着如果我们不编辑源文件,classpath和sourcepath都不会被重新编译?
具体来说,这条线让我困扰!
请注意,如果找到了源,则通过类路径找到的类会自动重新编译。
任何人都可以用简单的语言用简单的例子解释一下吗?这会有很大的帮助!

Does it mean if we dont edit the source file,both classpath and sourcepath wouldnt be recompiled? Specifically,this line troubled me! Note that classes found through the classpath are subject to automatic recompilation if their sources are found. Can anyone explain this in simple language with SIMPLE EXAMPLES?It would be of great help!

推荐答案

源路径是您正在编译的源的路径。

The sourcepath is the path to the sources you are compiling.

类路径是您要编译的库的路径(或多个路径)。这些是编译类,可以在文件夹或Jar文件中。

The classpath is a path (or multiple paths) to libraries you are compiling against. These are compiled classes, either in folders or Jar files.

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

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