我可以使用 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.
我正在尝试编译 srcsolution(称为 Console.java)中的一个文件,该文件使用来自 src 中其他目录的导入,这些目录仍未编译.
I'm trying to compile a file in srcsolution (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屋!