可以使用JAVAC来编译具有多个文件和目录的项目吗? [英] Can I use JAVAC to compile a project with multiple files and directories?
问题描述
我正在研究一个非常大的项目,它将多个目录中的类文件相关联,全部源自根目录\src。
I'm working on a very large project that has associated class files in multiple directories, all stemming from the root dir \src.
我正在尝试编译src\solution\(称为Console.java)中的一个文件,该文件使用从src中的其他目录导入,这些文件仍然未编译。
I'm trying to compile a file in src\solution\ (called Console.java) that uses imports from other directories in the src, which are still uncompiled.
所以如果我想在IDE之外编译Console.java,该怎么做呢?哦,是的,我也有一些外部的JAR需要包含在构建中。
So if I want to compile Console.java outside of an IDE, how do I go about doing that? Oh yeah, I also have some external JARs which need to be included in the build.
谢谢!我很感激!
推荐答案
我会看看使用 Ant 来创建构建脚本。现在有一点工作,但是在项目的一生中会有所回报。
I would look at using Ant to create a build script. It's a little bit of work now but it'll pay off over the lifetime of your project.
这篇关于可以使用JAVAC来编译具有多个文件和目录的项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!