HOW TO INSTALL JAVA IN MAC OS AND SET JAVA_HOME

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello friends today we will see how to install java in a mac os so for that we'll see whether the java is not being installed yet for that we'll go to the terminal and then type java version so the operation couldn't be completed so there is no java file here to run and there is other option to check over it which is like you can go to system preferences and then you can see here the java file java icon is not here so the java is not being installed over here okay so now for this we'll install java for it first so for that we're going to install java 16 bit so download java 16 bit and you will see the first link java c development kit 16 which is from oracle you can click on this link and then scroll it over and then you will see the java sc development kit 16 ovr and then you can just download it depending on the os app so i have a mac os here so i'm just going to download this so click on this link and then it asks the policy and i just click on this download yeah it's been downloading so yeah wait for it now it is downloaded so you can click on this or you can go to downloads and just click on it to open it yeah now i see a screen with a package like this so when you double click on it it just opens up so i'm just double clicking on it and through the installation yeah continue install so it asks for an username and a password here so you have to type the admin username and the password for macos okay and then press on install software so the install is being succeeded here so click on close and then now what we do is go to the terminal and then i'm just going to know whether it is installed or not yeah it says that during the initialization this means that i have to open a new terminal and then java version now it says java version 16 is being installed so it has been completely installed in our system now we'll save the java home location so for that we'll go to the root first so the command is cd so this command is for going to the root and then we list all the files which is here okay so ls okay so that it lists all our files over here and there is no file which is named as bash profile so i'm just going to create this file so that it just gets created so vi space point bash profile and then press enter yeah it gets great press i to insert the data yeah we write export java home equal to slash usr slash basic slash java home so this is the java default location here so this is nothing but the java default location okay so after this and then colon okay escape and colon so it comes to the last line over here so now you have to enter w q and exclamatory and then press enter so inside the bash profile file now the java home has been set now we type echo java home so all should be in caps and then press enter so nothing comes over here so that you have to open a new terminal fresh terminal so what i do is close this terminal and then open a new one so type echo java underscore home it should be like dollar symbol over here double dollar number and java home so now here you get the location of the java which is placed so this is the java location and now you can execute all the java commands using this thank you that's it for today thank you
Info
Channel: Short Stuff
Views: 530
Rating: undefined out of 5
Keywords: INSTALL MAC, mac, mac os, os, java, java in mac, install java mac, short, java 16, java testing, java for selenium, java for oracle
Id: X8Os800Oslg
Channel Id: undefined
Length: 6min 21sec (381 seconds)
Published: Thu Aug 05 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.