Compiling the entire Java EE project with Javac

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.