aspose file tools*
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 Java 8 in Action this week in the Java 8 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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can compile whole package in one time
 
Similar Threads
Source code from More Servlet & JSP
compile a single file with ANT
trying to get suncertify.db classes to compile
Is there any difference in importing.
How to compile