Ubuntu18.10 configure Java environment

This method is also applicable to various Linux versions, including but not limited to Ubuntu 18.10.

Download JDK

To download jdk from Oracle official website, you need to click the accept licence to download it. Use the following command to download it directly.
Please go to Official Website to obtain the installation package link.

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie"Installation package link

Such as:

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz

Unzip###

tar -xzvf jdk-8u181-linux-x64.tar.gz

Set environment variables###

vi /etc/profile

Add at the end

# set java environment
JAVA_HOME=/home/wind/jdk1.8.0_181
JRE_HOME=/home/wind/jdk1.8.0_181/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH

Let the changes take effect###

source /etc/profile

Recommended Posts

Ubuntu18.10 configure Java environment
Configure Java development environment in Ubuntu20.04 LTS
Ubuntu 18.04.1 build Java environment and HelloWorld
CentOS 7 configure Java language development environment
Ubuntu configure Tomcat
Ubuntu configure Apache
Configure Nginx + PHP 7.0 + MySQL environment under Ubuntu 16.04
Install JDK and configure environment variables on Ubuntu 16.04
ubuntu16.04 deploy GPU environment
Ubuntu configuration development environment
ubuntu 14.04 configure 3-wire 3IP
Python virtual environment: Ubuntu16.04
Ubuntu Touch environment setup
Ubuntu 18.10 configure Nvidia driver
Centos7 configure nodejs environment
ubuntu environment deployment project
Configure CentOS7 GPU environment
Ubuntu configure SecureCRT login
Embedded Linux development environment to build and configure Ubuntu
Install and configure Mono production environment on Ubuntu Server
Django&MySQL environment deployment under Ubuntu 14.04
CentOS 7 install JAVA environment (JDK 1.8)
ubuntu14.0464 Ros environment install halcon13.01
Configure tomcat on ubuntu server
Install Oracle Java8 on Ubuntu
Ubuntu server builds Java web server
ubuntu build python development environment
ubuntu builds common development environment
ubuntu offline installation python environment
Deploy JobConverter + Ibreoffice environment on Ubuntu
Ubuntu environment variables and ADB configuration
CentOS 7 configure Ruby language development environment
Install and configure MySQL on Ubuntu
CentOS 7 configure php language development environment
Install and configure Docker in Ubuntu
Docker ubuntu: install python-PIL-image environment on 14.04
ubuntu modify and configure ip address
Install Python virtual environment on Ubuntu 18.04
Configure python3 environment on centos7 and
Ubuntu 19.1 installation and configuration Chinese environment
Install Spark stand-alone environment on Spark Ubuntu18
Install Hadoop system environment on Ubuntu 18.04
Configure ring after installation on Ubuntu 16.04
CentOS 7 configure Python language development environment
Centos7.5 configuration java environment installation tomcat explanation
JDK environment variable configuration method under ubuntu
Build the C++ compilation environment under ubuntu
About installing node environment in Ubuntu server
Steps to build LNMP environment on ubuntu 20.04
Build arm virtual operating environment on Ubuntu
How to configure Redis cluster on Ubuntu 14.04
Configure Nginx Git server on Ubuntu system
Download OpenJDK11 source code in Ubuntu environment
Ubuntu Server builds Hyperledger Fabric 2.1 learning environment
Configure android debugging tool adb under ubuntu16.04
How to configure Redis replication on Ubuntu 16.04
Vagrant quickly builds Ubuntu virtual machine environment
GPU programming (1): CUDA8.0 environment construction under Ubuntu
Build a python development environment under Ubuntu
Ubuntu16.04 configure your own network card information
Docker those things in the Ubuntu environment