2 Minutes To Code (β Version)

'javac' command - 2 minute tutorial

How to compile multiple java source code files

To compile multiple classes, put all the file names separted by space character on the command line.

Alternatively, use the shell wild character (*) as shown in the image below. This works in both windows and linux.

The * option will help you to compile multiple classes only if they are in the same folder. If the classes are spread in several different folders, then you have 2 options.
  1. Get list of classes using unix command find and pass this to unix command xargs for compilation as shown in the next page .

  2. Use a build tool like Apache Ant