Linux Installation Java Development environment

Source: Internet
Author: User

  One, JDK installation

Steps to install the JDK (install using the root user login to avoid the need for file authorization)

(1) Download JDK,JDK storage directory is generally stored in the/OPT directory (Oracle website download JDK, need to accept license, using the following command can be directly authenticated by the user)

wget--no-check-certificate--no-cookies--header "Cookie:oraclelicense=accept-securebackup-cookie"/HTTP/ Download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz

CP jdk-8u144-linux-x64.tar.gz/opt/

(2) Unzip the JDK

TAR-XZVF jdk-8u144-linux-x64.tar.gz

PWD--/opt/jdk1.8.0_144

(3) Setting the JDK environment variable

Export Java_home= "/opt/jdk1.8.0_144"

Export path= "$JAVA _home/bin: $PATH"

(4) Refresh the configuration for the configuration to take effect

source/opt/jdk1.8.0_144

(5) Write demo verification

Touch Demo.java

Vim Demo.java

public class demo{public         static void Main (string[] args) {                   System.out.println ("Hello World");         }                }

Javac Demo.java See if Demo.class is generated

Java demo to see if the output is printed, there is a successful installation

  II. TOMCAT Installation

(1) Download and unzip the Tomcat GZ file

wget http://mirrors.hust.edu.cn/apache/tomcat/tomcat-8/v8.5.20/bin/apache-tomcat-8.5.20.tar.gz

TAR-XZVF apache-tomcat-8.5.20.tar.gz

(2) Go to Tomcat's Bin directory to execute startup.sh, log on after successful launch localhost:8080 see if the Tomcat interface is up and finished

Note: Java editing tools such as Eclipse can be installed on similar steps to develop Java programs in Linux.

Linux Installation Java Development environment

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.