Java:我如何编译整个目录结构的代码? [英] Java: How can I compile an entire directory structure of code ?

查看:178
本文介绍了Java:我如何编译整个目录结构的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

用例很简单。我得到了使用Eclipse创建的源文件。因此,有一个深层目录结构,其中任何Java类可以引用同一个,子,兄弟或父文件夹中的另一个Java类。

The use case is simple. I got the source files that were created using Eclipse. So, there is a deep directory structure, where any Java class could be referring to another Java class in the same, child, sibling or parent folder.

如何使用javac从终端编译整个事物?

How do I compile this whole thing from the terminal using javac ?

推荐答案

您必须知道所有目录,或者能够使用通配符。

You have to know all the directories, or be able to use wildcard ..

javac dir1/*.java dir2/*.java dir3/dir4/*.java dir3/dir5/*.java dir6/*src/*.java

这篇关于Java:我如何编译整个目录结构的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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