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 get excectuon time 
Java :: handler delay android 
Java :: textview set drawable right programmatically 
Java :: java age from date 
Java :: spigot how to create custom items 
Java :: springboot starter jpa 
Java :: copy array in java 2d 
Java :: javafx tableview clear all data 
Java :: statement delete sql java 
Java :: java selenium new window 
Java :: debug keystore 
Java :: print list in java 
Java :: java format 2 decimal places 
Java :: array to map java10 
Java :: random string generator java 
Java :: print up to 2 decimal in java 
Java :: how to clear a text file in java 
Java :: get epoch time in java 
Java :: Java get fps 
Java :: onbackpressed close the app in android 
Java :: random processing 
Java :: how to take input in java 
Java :: how to clear stringbuilder in java 
Java :: how to constraint layout parm programmatically in android 
Java :: java number of days between dates 
Java :: java new string array 
Java :: plus one leetcode java 
Java :: how to check if page in webview or not in android studio 
Java :: Youtube video thumbnail not load in android 11 or above progmatically 
Java :: android display drawable in imageview 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =