jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes how can compile whole package in one time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "how can compile whole package in one time" Watch "how can compile whole package in one time" New topic
Author

how can compile whole package in one time

Jack Deng
Greenhorn

Joined: May 29, 2004
Posts: 23
I got a source code package, but there are plenty of .java files. compile them one by one will waste my time, can anyone tell me how to compile the whole package in one time


Jack
Stefan Wagner
Ranch Hand

Joined: Jun 02, 2003
Posts: 1923


or
or use ant, which is a build-tool for java.

javac without arguments shows compile-options.


http://home.arcor.de/hirnstrom/bewerbung
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I second Ant.

You might have luck by simply moving all of the source files out of their sub-directories into a common directory, and then running the following command.

javac -d . *.java


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
Jack Deng
Greenhorn

Joined: May 29, 2004
Posts: 23
there are some sub folders within the package, can I complie the .java files of the sub folders at the same time?
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
I suggest removing everything from any sub folders, putting all souce code files in a single folder, then trying the command I posted above.

Did it work?
 
 
subject: how can compile whole package in one time