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

set java home sdk macbook

//First install java sdk then
export JAVA_HOME=$(/usr/libexec/java_home)
Comment

java home mac

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

PREVIOUS NEXT
Code Example
Java :: android studio constraint layout proportional height 
Java :: how to get key value from json object in java 
Java :: permission foreground_service 
Java :: string to byte array java 
Java :: printing prime numbers in java 
Java :: java print 2d char array 
Java :: random numbers java 
Java :: remove all new line and other in string using java 
Java :: java read directory 
Java :: java numbers 
Java :: arrays.tostring java 
Java :: how to iterate pixels image java 
Java :: string reverse in java 
Java :: iterable interface in java 
Java :: final method meaning 
Java :: java print 
Java :: break java 
Java :: java declare array 
Java :: next greater permutation leetcode 
Java :: javafx change textfield background color 
Java :: how to check the end of a string java 
Java :: sort an int array java 
Java :: random boolean java 
Java :: how to convert int to string in java? 
Java :: for each loop java string array 
Java :: runtime intalize array in java 
Java :: java localtime 
Java :: get the length of an array java 
Java :: armstrong number in java 
Java :: all installed java 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =