How to set up Java Home on Ubuntu and Raspbian

How to set the JAVA_HOME environment variable in Ubuntu and Raspbian.

Because the configuration of Raspbian is similar to Ubuntu, how to configure it.


First, you can try echo $JAVA_HOME to check whether the environment variables in the system are configured.

If there is no output, there is no configuration.

Use the following command to edit environment variables.

sudo nano /etc/environment

Enter the following at the end of the configuration file:

JAVA_HOME="/usr/lib/jvm/default-java/"

If you don't know what the JDK version you installed and what the path is, please refer to the following article: How to check the installed JDK in Ubuntu.

After saving and exiting, run the command:

source /etc/environment

The purpose of this command is to apply the modified configuration to the current user.

Then run the echo $JAVA_HOME command, you can see that the current JAVA_HOME environment variable has been configured successfully.

https://www.cwiki.us/questions/57938481

Recommended Posts

How to set up Java Home on Ubuntu and Raspbian
How to set up R on Ubuntu 14.04
How to set up Shiny Server on Ubuntu 14.04
How to set up time synchronization on Ubuntu 18.04
How to set up a DNS server on Ubuntu 18.04
How to install Java on Ubuntu 20.04
How to set up a Masterless Puppet environment on Ubuntu 14.04
How to set up a firewall with UFW on Ubuntu 14.04
How to set up vsftpd for anonymous downloads on Ubuntu 16.04
How to set up a production Elasticsearch cluster on Ubuntu 14.04
How to set up an Apache virtual host on Ubuntu 16.04
How to set up an Apache virtual host on Ubuntu 20.04
How to set up password authentication with Nginx on Ubuntu 14.04
How to set up vsftpd for user directories on Ubuntu 16.04
How to set PostgreSQL startup on Ubuntu 16.04
How to install Pycharm and Ipython on Ubuntu 16.04/18.04
How to install and configure NATS on Ubuntu 16.04
How to set static IP on Ubuntu 18.04 Server
How to install and configure Gogs on Ubuntu 18.04
How to install and configure Cyberpanel on Ubuntu 18.04
How to install Java on Ubuntu 16.04 using Apt-Get
How to install and secure phpMyAdmin on Ubuntu 16.04
How to set static IP on Ubuntu 18.04 Server
How to install and configure ownCloud on Ubuntu 16.04
How to install and configure ownCloud on Ubuntu 16.04
How to set up SSH keys on CentOS 8
Explain how to set static IP on ubuntu14.04
How to install and configure GitLab on Ubuntu 18.04
How to install and use Docker on Ubuntu 20.04
How to install and configure Ansible on Ubuntu 18.04
How to install and use Curl on Ubuntu 18.04
How to install and use Composer on Ubuntu 18.04
How to install and use Wine on Ubuntu 18.04
How to install and secure phpMyAdmin on Ubuntu 16.04
How to install and configure Elasticsearch on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to install and use Composer on Ubuntu 20.04
How to install and use BaasBox on Ubuntu 14.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure Sphinx on Ubuntu 16.04
How to install and configure OrientDB on Ubuntu 14.04
How to install and use PostgreSQL on Ubuntu 16.04
How to install Oracle Java 14 on Ubuntu Linux
How to install and configure AppScale on Ubuntu 12.04
How to install and use Docker on Ubuntu 16.04
How to install and configure PostGIS on Ubuntu 14.04
How to set time zone and NTP synchronization on Ubuntu 14.04 [Quick Start]
How to backup and restore Redis data on Ubuntu 14.04
How to create and use MongoDB backups on Ubuntu 14.04
How to set up Ghost one-click app for Ubuntu 16.04
How to install and use MySQL Workbench on Ubuntu 18.04
How to install theano and keras on ubuntu system
How to set a fixed IP based on Ubuntu 16.04
How to Run Tmux Service Scripts on Ubuntu Start Up
How to install Ruby on Ubuntu 20.04
How to install Memcached on Ubuntu 20.04
How to install MySQL on Ubuntu 20.04
How to install Elasticsearch on Ubuntu 20.04
How to set up an Apache virtual host on CentOS 7
How to install Protobuf 3 on Ubuntu
How to install Nginx on Ubuntu 20.04