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

查看:51
本文介绍了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天全站免登陆