JDK Configuration Installation1: Download the Jdk--for_linux version from the Oracle official website (personal generally on the Baidu network disk download resources faster), placed in the shared directory, can also be directly downloaded to the download directory Ubuntu, the final decompression;
Decompression command: Tar zxvf jdk-8u5-linux-i586.tar.gz
At this point the JDK is copied to the/usr/lib/java directory, note that even if there is no jdk1.8.0_05 this folder, you can also execute the following command, the system will automatically create jdk1.8.0_05 this folder.
Next you need to enter the configuration file to set the JDK environment variable. There are two options, if you modify the. profile file under the current User name home folder, this configuration is only valid for the currently logged-on user, and you can modify the/etc/profile file if you need to be valid for all users of the computer. Here you use the Gedit command, as follows: Modify the current logged-on user profile: ~$ sudo gedit ~/.profile Modify the System profile: ~$ sudo gedit/etc/profile
Export java_home=/usr/lib/java/jdk_1.8.0_05 export Jre_home=/usr/lib/java/jdk_1.8.0_05/jre export classpath=.: $JAVA _home/lib: $JRE _home/lib: $CLASSPATH Export path= $JAVA _home/bin: $JRE _home/bin: $JAVA _home: $PATH
After you save the profile file, you
also need to have the system reload the profile, you can use the following two commands to enable Ubuntu to reload the profiles, the following two ways can be:Use the source command:
~$ Source/etc/profile
Use the. Command:~$./etc/profile
After configuring the environment variables, you can use the Echo $PATH command to view the current environment variable values, ensuring that the current JDK directory has been added to the environment variable as follows:
If the installation is successful and you have finished installing Ubuntu under JDK, you can use the Java-version command to see if the installation is successful and the output is as follows:
eclipe Configuration installation:
Unzip the zip file (if a. zip file is typically decompressed in the window quickly and again in the shared directory faster)
Run:./eclipse
New project:
Compile the build header file. h file
Ubuntu builds Eclipse development environment summary