Install the Java 8 Development Environment under Debian7.4 (wheezy)

Source: Internet
Author: User

Install the Java 8 Development Environment under Debian7.4 (wheezy)

For Ubuntu systems, installing sun-java is relatively simple. After adding the source, you can directly use the command to install it. The previous Ubuntu installation of java 7 () has a detailed explanation, however, for the Debian system, it is difficult to install the source due to various source problems. Therefore, Debian installation methods are described here.

Debian 7.0 Wheezy test experience

Debian 7.0 Wheezy released!

Debian7 (Wheezy) and basic configuration for hard disk installation

Java 8 Nashorn Engine

Java 8 concise tutorial

1. Official download java version to install: http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. For example, select and download the JRE version that is often installed:

3. Unzip the package:

4. Move the folder to the/usr/lib/jvm/directory:
(1) su

(2) enter the password

(3) mv jdk1.8.0/usr/lib/jvm/

5. After the migration is successful, add the environment variable:
(1) sudo gedit/etc/profile

(2) enter the following content at the end of the file, save and exit:

Export JAVA_HOME =/usr/lib/jvm/jdk1.8.0
Export JRE_HOME =$ {JAVA_HOME}/jre
Export CLASSPATH =. :$ {JAVA_HOME}/lib :$ {JRE_HOME}/lib
Export PATH =$ {JAVA_HOME}/bin: $ PATH

6. Update the configuration: sudo source ~ /. Profile

7. Configure java and javac tools in JDK1.8:
Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.8.0/bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk1.8.0/bin/javac 300

8. Modify the default java and javac versions of the system:
Sudo update-alternatives -- config java
Sudo update-alternatives -- config javac

9. For example, the author configures java tools in java 8 as the default:

Configure the javac tool in Java 8 as the default:

10. Run the following command to view the default java version of the System Configuration:

This article permanently updates the link address:

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.