Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

set java home in ubuntu

Java is typically installed in /usr/java locate the version you have and then do the following:

Assuming you are using bash (if you are just starting off, i recommend bash over other shells) you can simply type in bash to start it.

Edit your ~/.bashrc file and add the paths as follows:

for eg. vi ~/.bashrc

insert following lines:

export JAVA_HOME=/usr/java/<your version of java>
export PATH=${PATH}:${JAVA_HOME}/bin

after you save the changes, exit and restart your bash or just type in bash to start a new shell

Type in export to ensure paths are right.

Type in java -version to ensure Java is accessible.
Comment

PREVIOUS NEXT
Code Example
Shell :: how to delete folder from remote git 
Shell :: pi raspi-config 
Shell :: command to find Server’s Public IP Address using curl 
Shell :: pods remove and reinstall react-native 
Shell :: install ruby and rails on mac 
Shell :: macos kill dns cache 
Shell :: how to uninstall lightshot in ubuntu 
Shell :: Please make sure, that MariaDB Connector/C is installed on your system. 
Shell :: ubuntu server set timezone 
Shell :: sudo apt-get -y install postgresql 
Shell :: pm2 kill all 
Shell :: CUDA_HOME environment variable is not set. Please set it to your CUDA install root. 
Shell :: ubuntu fingerprint sudo 
Shell :: do-release-upgrade 
Shell :: Unable to resolve module ./theming/DarkTheme from 
Shell :: install lamp on ubuntu 22.04 
Shell :: git change personal access token command line 
Shell :: android studio (not installed) windows 
Shell :: linux count number of files in directory and subdirectory 
Shell :: github epitech 
Shell :: how to restart docker linux 
Shell :: terminal find file by extension recursive 
Shell :: powershell check iso sha256sum 
Shell :: E: Unable to locate package libboost-signals-dev 
Shell :: Remove folder recursively using powershell 
Shell :: httrack ubuntu 
Shell :: Install Nginx, MariaDB and PHP centos rhel 
Shell :: git reset origin branch 
Shell :: pycharm community install ubuntu 
Shell :: bash copy files but exclude some directories 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =