Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to set the java_home in mac

Step-1: open terminal and type ls -al
if you did not find the .bash_profile proceed with Step-2 else continue with Step-3
Step-2: touch .bash_profile
Step-3: open -e .bash_profile
Step-4: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_281.jdk/Contents/Home
Step-5: save it and close it
Step-6: source ~/.bash_profile
Step-7: echo $JAVA_HOME
Comment

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
Comment

java home mac

echo "
export JAVA_HOME=/usr/libexec/java_home
" >> ~/.bashrc && . ~/.bashrc
Comment

PREVIOUS NEXT
Code Example
Java :: java http request post 
Java :: append button java 
Java :: string starts with alphabet java 
Java :: java get longest string in array 
Java :: react native android gif 
Java :: java for range loop 
Java :: java pause program until key pressed 
Java :: char variable java 
Java :: compare date with current date in android 
Java :: java create list of strings 
Java :: android send parameters with intent 
Java :: java check data type 
Java :: difference between abstract class and final 
Java :: remove new line in string of java 
Java :: get boolean from string java 
Java :: how to instantiate hashmap in java 
Java :: even digit sum java 
Java :: resource leak java 
Java :: swap function java 
Java :: get first character of string java 
Java :: Service vs Intent Service 
Java :: how to print array 
Java :: spring boot mongodb update subdocument 
Java :: sum numbers in array java 
Java :: how to make an int into a string java 
Java :: remove extra spaces java 
Java :: fibonacci series in java using recursion 
Java :: java array remove space 
Java :: android string java 
Java :: enum type spring boot entity 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =