Configuring the Java Development environment under Linux

Source: Internet
Author: User

jdk:http://www.oracle.com/technetwork/java/javase/downloads/ Jdk8-downloads-2133151.html Choose 64-bit or 32-bit downloads based on the version of the Linux system, available in two versions of RPM and tar.gz. Installing:[[email protected] cdrom]# rpm -ivh  jdk-8u25-linux-x64.rpm Configuring the JDK environment variable method One: Set the variable under the shell (this method is only valid for the current shell, and will need to be reconfigured if you open another shell)  export java_home =/usr/java/jdk1.7.0_40/ export path= $JAVA _home/bin: $PATH   export classpath=.: $JAVA _ Home/lib/dt.jar: $JAVA _home/lib/tools.jar (where only  export path=/usr/java/jdk1.7.0_40/bin is configured: $PATH   can also)   method two: Modify the/etc/profile file (this method once and for all, set once, for all users) open the/etc/profile file with the Vim editor and add the definition of the environment variable at the tail of the file java_home=/usr/java/ Jdk1.8.0_25/path= $JAVA _home/bin: $PATHCLASSPATH =.: $JAVA _home/lib/dt.jar: $JAVA _home/lib/tools.jarexport  Java_homeexport pathexport classpath Save exit, view Java version [[Email protected] cdrom]# java  -versionjava version  "1.8.0_25" Java (TM)  SE Runtime Environment  (build  1.8.0_25-B17) Java hotspot (TM)  64-bit server vm  (Build 25.25-b02, mixed mode) indicates installation success   Method Three: Modify ~/. The BASHRC file (which is modified only for the current user and valid for all shells of that user) opens the ~/.BASHRC file with the Vim editor to add the definition of the JDK environment variable at the end of the file set java_home=/usr/java/ Jdk1.8.0_25/export java_homeset path= $JAVA _home/bin: $PATHexport  pathset classpath=.: $JAVA _ Home/lib/dt.jar: $JAVA _home/lib/tools.jarexport classpath


Configuring the Java Development environment under Linux

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.