Introduction to the android crazy handout and Apache ant installation help

Source: Internet
Author: User

1. Cd content

The code in the CD is stored by chapter, that is, the code used in Chapter 2nd and section 2nd is placed in the 02 \ 2.2 folder, and so on.

In addition, each source code in the book also shows the correspondence with the source file of the CD, which is convenient for readers to find.

There are 19 folders on the CD. The content and meaning are described as follows:

(1) folder name 01 ~ 19 corresponds to the chapter number in the book, that is, the code used in Chapter 2nd is put under the 02 folder, and so on.

(2) The 10 folder contains two folders: hrsystem and hrsystem_eclipse. They are the source files of the same project. hrsystem is a project unrelated to the IDE platform and can be compiled using ant; hrsystem_eclipse is the project file of this project in the Eclipse IDE tool.

(3) most of the projects in this book are eclipse projects. Therefore, the project folder contains. classpath,. Project, and other files. These files are Eclipse project files. Do not delete them.

2. Runtime Environment

The program in this book has been debugged in the following environment:

(1)install jdk-6u22-windows-i586-p.exe. After installation, add the classpath environment variable. The value of this environment variable is % java_home %/lib/tools. jar; % java_home %/lib/dt. jar. To compile and run Java programs, add % java_home %/bin to the path environment variable. Java_home indicates the JDK (not JRE) installation path.

(2) install Android 2.3. Create an AVD virtual device. For how to install the android SDK, see Chapter 1st.

(3) install Apache tomcat7.0.6. Do not use the installation file, but decompress the installation method. For details about how to install Tomcat, see Chapter 1st lightweight Java EE Enterprise Application Practice in crazy Java. After installation is complete, add the jsp-api.jar and servlet-api.jar jar files under the Lib of the tomcat installation path to the classpath environment variable.

(4) install Apache-ant-1.8.1.

Decompress the downloaded ant compressed file to any path, add the ant_home environment variable, and set the variable value to the ant decompression path.

Add the % ant_home %/bin environment variable to the PATH environment variable.

(5) install eclipse-jee-Helios (that is, eclipse 3.6 for Java EE developers ).

Install the ADT plug-in. After installing the plug-in, set the android SDK path in eclipse.

For more information about how to install the above tools, see Chapter 1 of this book.

3. Notes

(1) All Android projects in this book are eclipse projects. You only need to import them into the eclipse tool.

(2) This section describes network programming involving a few web applications. Copy the web application to the % atat_home %/webapps path, enter the path of build. XML, and run the following command:

Ant compile -- compile the application

Start the Tomcat server and use a browser to access the application.

(3) import the eclipse development tool to the Eclipse project file.

(See readme.txt under the Project for the case in Chapter 19th of 42.16.

(5) some of the books need to connect to the database according to the case. The reader should modify the database URL, user name, and password so that the code is consistent with the running environment of the reader. If there is an SQL script in the project, you can import the SQL script. If there is no SQL script, the system automatically creates the table at runtime. You only need to create the corresponding database.

(6) This book describes network programming, sensor programming, and other sections that need to be connected to a PC. The IP address of my PC is 192.168.1.88. You can set your own IP address to this address, or change the IP address used in the program to the IP address of your PC.

(7) When using the CD program, copy the program to the hard disk and remove the read-only attribute of the file.

Related Article

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.