In the near future, learning a technology must run under Linux, so start learning how to use Linux.
In the installation of JDK difficulties encountered, the environment variable configuration is not successful, took a day to finish, special share out for your reference.
To install the JDK under Linux, proceed as follows
1: Download the JDK Package: This chapter uses a file with the suffix tar.gz (no installation required), such as jdk-7u67-linux-i586.tar.gz
2: Save the JDK file to the Linux directory: Use the mkdir command to generate the User/java directory from the console, and put the file under it
3: Unzip the tar.gz file: Through the console, enter User/java, execute $ tar zxvf jdk-7u67-linux-i586.tar.gz, unzip it
4: Configure Environment variables: Open the console, run sudo vi/etc/profile, insert the content you want to configure at the end, press ESC, enter (: Wq Save and exit)
Java_home=/home/gcs/user/java/jdk1.7.0_67path= $JAVA _home/bin: $PATHCLASSPATH =.: $JAVA _home/lib/dt.jar: $JAVA _home /lib/tools.jarexport Java_homeexport Pathexport CLASSPATH
5: Run $ source/etc/profile to make the configuration environment effective
6: Run $ java-version to see if it takes effect. If the JDK version number appears, install and configure the environment variable successfully
Installation of the Java Development environment JDK on Ubuntu