How to configure Java environment variables in Linux system

How to configure Java environment variables in Linux system

Configure Java environment variables

Here, the environment variables are configured in etc/profile, that is, the JDK environment is configured for all users.

sudo vi /etc/profile

Configure environment variables (note the jdk location)

#set java env
export JAVA_HOME=/usr/lib/jdk/jdk1.8.0_171
export JRE_HOME=${JAVA_HOME}/jre  
export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
export PATH=${JAVA_HOME}/bin:$PATH

Execute the command to make it effective:

source /etc/profile

Summarize

The above is the configuration method of Java environment variables in Linux system introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • How to set Java environment variables (graphic tutorial)
  • Basic method of installing Java and configuring environment variables on Mac OS
  • Detailed explanation of Java environment variable configuration method
  • How to set java environment variables under Windows
  • Tips for installing java and configuring environment variables under centos7
  • Tutorial on configuring Java environment variables on CentOS
  • How to configure java environment variables in Zookeeper under Windows
  • Install Java on MAC system and configure environment variables
  • The whole process of configuring Java environment variables under Win10 system

<<:  Detailed explanation of the use of Join in Mysql

>>:  jQuery achieves the effect of advertisement scrolling up and down

Recommend

Deleting files with spaces in Linux (not directories)

In our daily work, we often come into contact wit...

Use the CSS border-radius property to set the arc

Phenomenon: Change the div into a circle, ellipse...

Docker builds jenkins+maven code building and deployment platform

Table of contents Docker Basic Concepts Docker in...

37 Tips for a Good User Interface Design (with Pictures)

1. Try to use single column instead of multi-colum...

Recommend 60 paging cases and good practices

<br />Structure and hierarchy reduce complex...

How to deploy LNMP & phpMyAdmin in docker

Environmental preparation: Deploy lnmp on a host ...

Display special symbols in HTML (with special character correspondence table)

Problem Reproduction When using HTML for editing,...

How to mount a disk in Linux

When using a virtual machine, you may find that t...

Using nginx + fastcgi to implement image recognition server

background A specific device is used to perform i...

How to create users and manage permissions in MySQL

1. How to create a user and password 1. Enter the...

Some references about colors in HTML

In HTML, colors are represented in two ways. One i...

Summarize the common properties of BigIn functions in JavaScript

Table of contents 1. Overview 2. Attributes 1. Ma...