0

I'm using javac mypackage/*.java but I want it to also include .java files that are in folders that are in the mypackage folder, and folders within those folders, etc.

How can I do this?

2
  • 1
    why don't you use IDE to compile? If not you can make bat-file where you recursively traverse directories or hard-code and compile all files in every. Commented Dec 14, 2012 at 7:36
  • I'm using the terminal through ssh Commented Dec 14, 2012 at 7:40

2 Answers 2

4

On a Unix-like OS, find ./mypackage -name '*.java' | xargs javac should sort you.

Sign up to request clarification or add additional context in comments.

1 Comment

in windows ?!~ please
1

You may also create an ant or maven script to accomplish the same thing. These scripts will provide you a more manageable way to build and deploy the project. For details on ant see: http://ant.apache.org/ for ant and http://maven.apache.org/guides/ for maven scripts.

Hope this helps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.