what up guys welcome back to the channel
my name is jamal and today i'm going to
be showing you how you can install java
on your mac machine
pretty easy guys let's do this so what
i'm about to do is hop over to my
computer screen over here so you guys
can see exactly what i do to install
java to confirm that java is not running
on my machine is open up terminal
and what you want to type is java
hyphen version
and you should get a prompt like this so
it's telling me that i need to install
my jdk and that's exactly what we're
about to do
so just click ok
i'm going to open up safari
you can use whatever browser you want
i'm going to type java jdk download
you're going to click the first link the
java se downloads link
so at the time of this recording the
latest version of java is se15 so we're
going to download that so you're just
going to click the jdk download link
so once you're on this page you're going
to scroll down and depending on what
platform you're using i'm going to click
the
corresponding download link so i'm on a
mac machine so i'm going to click this
and once you click the check box to say
that you re um review and accept the
terms and conditions you're going to
click download
i'm just gonna allow it
alright guys so while that's downloading
i'm gonna pause the screen
and then come back once it's done all
right guys i'm back the file has
successfully downloaded right now i'm
going to launch that file and install
java on our machine
all right so we're gonna double click on
the jdk 15 package
and we're going to click continue
it's just going to take about 321
megabytes of space install i'm going to
type in your password
and now it's going to install the files
so now that it's installed we're going
to click close
and now that we are done we can actually
move this to the trash
so great so now we have java installed
and that's just the first part what we
need to do now is actually set the java
home variable in order to do that
we're going to launch terminal again
i'm going to do cd
i'm going to tilde forward slash enter
so i'm up actually so now i'm actually
on my root directory
and what we want to do is type in echo
java
home
put the dollar sign in the front
and right now as you can see there's a
empty line which states that
the java home variable is not yet set up
so we need to do that right now so what
you want to do is to view the hidden
files and
in order to do that we're going to type
ls hyphen al that's going to show us all
the hidden files on our root directory
and what we need is to have the bash
underscore profile
right now it's not here so we're going
to create that
that file
and so in order to create that file all
you have to do is type
let's clear the screen first
all you have to do is do touch
and we're going to do dot
dash profile
okay
now we want to list
all
the hidden files again to make sure that
it's there
and as you can see we have the dot batch
profile now created so what we want to
do we're going to clear the screen
so what we're going to do is we want to
open up that file and actually set the
home variable in that file so in order
to do that all we need to do is hit type
open
e command and we're going to say open
the bash
profile
all right guys now that we have our
batch profile
file actually launched what we want to
do is we're going to copy this line of
code right here
and paste it into this file so we have
export java home is equal to the
location with the jdk was installed
and once you do that click save
and then you can close that
so you're going to clear this screen
and while you have to do is to refresh
the batch file all you have to do is
type source
tilde
forward slash dot bash
profile
so now that should refresh it now in
order to check to see if the java home
variable was set all we can do is do
echo
dollar sign java
let's go home
and now what you can see guys we can
actually see
the java home variable is set which is
pretty good
all right so what we want to do right
now is confirm that the java version is
actually displaying
so we type java hyphen version
so there you guys have it the latest
version java 15 installing your mac
machine
it's probably like five minutes ten
minutes
and it was pretty good
yeah anyways guys so if you like the
content please feel free to smash the
like button subscribe to the channel i'm
gonna be talking to you more about
tutorials on software engineering some
more photography and videography
and that's what i do on a day-to-day
basis just so appreciate it see you guys
in another video peace out
[Music]