Linux Mint 17 is installed with the default OPENJDK, you can use Java-version to view
Now you need to use Sun/oracle's official jdk:http://www.oracle.com/technetwork/java/javase/downloads/index.html.
After downloading the installation steps are as follows:
- sudo mkdir/usr/java,cd/usr/java
- Copy the downloaded JDK files to the/usr/java directory, sudo cp ~/jdk-8u25-linux-i586.tar.gz.
- Unzip the JDK file, tar zxvf jdk-8u25-linux-i586.tar.gz
- To configure environment variables, you can add the following to the new. Sh script file in the/etc/profile or/ETC/PROFILE.D directory or the. BASHRC in the home directory:
Export Java_home=/usr/java/jdk1.8.0_25export jre_home= $JAVA _home/jreexport classpath=.: $JAVA _home/lib: $JRE _home/ Lib: $CLASSPATHexport path= $JAVA _home/bin: $JRE _home/bin: $PATH
- Then execute the source ~/.BASHRC, and use java-version to view
- If you need more than one configuration to use Eclipse, add the sun JDK you need to use in window->preferences->java->installed JREs
Install JDK under Linux Mint