Horje
set java home in ubuntu Code Example
how to install java 8 and set java_home in ubuntu
sudo apt install openjdk-8-jdk
set java_home permanently ubuntu
sudo gedit /etc/profile
#add following lines

JAVA_HOME=/usr/lib/jvm/{your jdk path}
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export JRE_HOME
export PATH
#logout to update the changes
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.




Shell

Related
asdf node fingerprint Code Example asdf node fingerprint Code Example
partially apply stash git Code Example partially apply stash git Code Example
ubuntu /not root-owned 0:1001 Code Example ubuntu /not root-owned 0:1001 Code Example
7z extract to folder with same name linux Code Example 7z extract to folder with same name linux Code Example
git change repo Code Example git change repo Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8