Transferred from: http://www.blogjava.net/zhyiwww/archive/2011/10/13/361145.html
We do projects and may use ant for system integration and deployment. In fact, Ant compiles the project with the Javac command in the final analysis.
Can we compile large projects directly with Javac? Yes, I can.
Take the project sample as an example to illustrate the following. If the Java EE Project sample is placed under/tmp/
"1" cd/tmp/sample
Go to the project directory to do the following
"2" Find Src-name *.java > Sources.list
Generate a list of files that need to be compiled, as follows:
1 Src/com/tt/dom/seityoficer.java
2 Src/com/tt/dom/usisitoffrproxy.java
3 Src/com/tt/dom/logincheckserver.java
4 Src/com/tt/dom/loginofficer.java
5 Src/com/tt/dom/securproxy.java
6 Src/com/tt/dom/operaxy.java
7 Src/com/tt/dom/loginrproxy.java
8 Src/com/tt/dom/loginofficerproxy.java
9 Src/com/tt/dom/userofficerproxy.java
Src/com/tt/dom/usermap.java "3" to compile, execute the following command
javac-classpath/opt/jdk1.6.0_18/lib/-d/tmp-extdirs/opt/apache-tomcat-6.0.20/lib/:webroot/web-inf/lib/@sources. List
"4" will generate the corresponding class file in the/tmp/directory.
Compiling the entire Java EE project with Javac