Java: How can I compile an entire directory structure of code ?
问题 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. How do I compile this whole thing from the terminal using javac ? 回答1: 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 回答2: With Bash 4, you can just enable globstar