1. Configure JDK
Go to the JDK directory under shell, enter the "./jdk-6u30-linux-i586.bin" command, then JDK binfile decompress to generate a folder named "jdk1.6.0 _ 30. :
Figure 1
Run the JDK binfile
Figure 2
Generate the corresponding folder
Copy the generated folder to the desired place (customize the file path according to your habits), such as to the "/usr/Java/" directory. :
Figure 3
Copy the generated directory to the custom path
Start to configure the JDK path in the system. Enter "sudogedit/etc/enviroment" in shell (You 'd better back up the enviroment file before), and enter the password to enter the text editing interface. Configure the JDK path according to the directory where your JDK is located, as shown in. After the modification, enter "Source/etc/enviroment" to execute the command to make the configuration take effect.
Figure 4
Configure the enviroment File
Similarly, modify the second file. Enter "sudogedit/etc/profile". Before umask022, modify the file according to your JDK path. (Note: Make sure you enter the value before umask022. Otherwise, the system cannot be entered after the restart !)
Figure 5
Modify Profile File
Enter "Java-version" in the shell to check whether the JDK version information shown in 6 is displayed in the shell. If yes, the JDK path is successfully configured. If no more information is displayed, enter "gedit ~ /. Bashrc ", add the path information just added to the profile file to the end of the". bashrc "file, save the information, and use" Source ~ /. Bashrc "to execute the command.
Figure 6 Java version information display
2. Set up eclipseandroid
Decompress the eclipse.tar file in the tutorial to a custom directory (for example, under the "/home/yuanxz/android" directory ). Similarly, extract the android-sdk.tar file to a custom directory (such as the "/root" Directory), run the eclipse program, and click window --> preference on the menu bar. The following window is displayed. Select Android and modify the path where sdklocation is your Android-SDK. After the environment is saved, the environment is created.
Figure 7
Specify the Android-SDK path in eclipse
Note: The Android-SDK of a higher version may be incompatible with the Java-SDK of a lower version. If your eclipse environment cannot display the content in the android options shown in Figure 7, please upgrade your Java-SDK.