Answers for "how to set java_home"

8

how to set java_home in ubuntu

#Update repo
sudo apt update

# Install java 8 from ubuntu repo
sudo apt install openjdk-8-jdk -y

#Set JAVA_HOME Path
ls /usr/lib/jvm/java-8-openjdk-amd64/
 export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
 echo $JAVA_HOME
 
 #Add JAVA bin directory to the PATH variable
 export PATH=$PATH:$JAVA_HOME/bin
 echo $PATH
 java -version
Posted by: Guest on September-07-2020
1

how to add java_home in mac

1. Open terminal window
2. Type command: $ vim ~/.bash_profile and Hit Enter
3. Type command: $ export JAVA_HOME=$(/usr/libexec/java_home) and press Escape key for Save changes.
4. Type command: :(colon)wq, It will Save and close .bash_profile file.
5. Type command: source ~/.bash_profile and hit Enter
6. Now we can check the value of the JAVA_HOME variable:
7. Type Command: echo $JAVA_HOME
 The result should be the path to the JDK installation:
 /Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
Posted by: Guest on April-05-2020
2

set java home path

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64

# Add JAVA bin directory to the PATH variable
export PATH=$PATH:$JAVA_HOME/bin
Posted by: Guest on July-22-2020
1

java_home what is

Optional.

The JAVA_HOME environment variable points to the file system location where 
the JDK (Usually only JDK not JRE) installed.

Avoid using it. Prefer to have your java in PATH or managed by something like JVMS
Posted by: Guest on September-08-2021
0

find where JAVA_HOME is set

grep JAVA_HOME /etc/environment /etc/bash.bashrc /etc/profile.d/* /etc/profile
Posted by: Guest on February-04-2021
0

setting java home

1.  Add a JAVA_HOME variable equal to something like:  C:\Java\JDK1.7.0_25_x64
2.  Add %JAVA_HOME%\bin to the beginning of your PATH variable.
Posted by: Guest on April-22-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language