Build the JDK + eclipse Environment

Source: Internet
Author: User
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.

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.