This content provides a step-by-step guide on how to download and install Java Development Kit (JDK) 19 on a MacBook, including the crucial step of setting the JAVA_HOME environment variable.
Mind Map
Click to expand
Click to explore the full interactive mind map • Zoom, pan, and navigate
what's up everyone welcome back to this
YouTube channel in this video I'll show
you how you can download and install
Java on your Macbook so let's do that go
to your favorite search engine mine is
Google and search for Java jdk download
Oracle and the first result that you see
here which is from the oracle.com click
on it
and in here we will install the Java 19
and as you can see the stabbed view here
we have uh various operating systems
listed out here Linux Mac OS Windows
since we are going to download it on Mac
OS I'm going to click on Mac OS and as
you can see we have four options here
but we are going to focus on these two
DMG installer options uh the first one
is arm 64 DMG installer so if you are on
MacBook M1 Pro or the arm
chipsets then go with the arm 64 DMG
installer if you're on Intel processor
then select the x64 DMG installer I'm on
MacBook M1 Pro so I'm going to select
this arm 64 DMG installer so I'll select
this link here click on it and as you
now as you can see the download is
finished what I will do is I'll click on
it and I'll be taken to this window uh
here I'll double click on this package
and an installer window will pop up so
let's click on continue click on install
and enter the password after that click
on install software and the installation
process will begin
and installation is successful let's
close it now you can keep the original
jdk installer file or you can move to
bin so I'm going to move it to bin
now we have done the half part of our
installation we also need to set the
Java underscore home environment variable
variable
but let's first open the terminal and
I'll type in Java dash dash version and
as you can see it says Java
19.0.2 is installed on my system so yeah
this is exactly the version that we just
installed so yeah Java is successfully
installed now we need to set the Java
underscore home variable and the way we
do that is we need to create a file so
I'm going to say touch tilde slash dot
zsh EnV and hit enter now I'll say open
tilde slash dot sir sh EnV this will
open up the file and in here you need to
type in this line export Java underscore
home is equal to dollar sign parenthesis
slash USR slash lib exec slash Java
underscore home in lowercase and then
closing parenthesis so after you have
done that save the file make sure this
is the E of the export is a lowercase
not the upper case once you save the
file we need to Source it so we can say
Source tilde slash dot service edge EnV
hit enter and now if I say Echo dollar
sign Java underscore home hit enter and
I get this value back which is the path
to our jdk 19. so yeah this is how we
set the Java underscore home variable in
mac and this completes our Java
installation now if you have any Java
file you can easily run that so yeah
actually let's try to run a Java file so
so I quickly created this simple Java
file which prints out hello world and if
I save it now
and I say Java C hello
hello
dot Java
and I say Java hello
hello
and you can see the Java file ran
successfully I got the expected output
back so yeah this is how you can
download and install Java on your
Macbook so I hope you find this video
helpful give this video a thumbs up
subscribe to my channel it keeps me
motivated for creating more videos like
this I'll see you in the next one until
Click on any text or timestamp to jump to that moment in the video
Share:
Most transcripts ready in under 5 seconds
One-Click Copy125+ LanguagesSearch ContentJump to Timestamps
Paste YouTube URL
Enter any YouTube video link to get the full transcript
Transcript Extraction Form
Most transcripts ready in under 5 seconds
Get Our Chrome Extension
Get transcripts instantly without leaving YouTube. Install our Chrome extension for one-click access to any video's transcript directly on the watch page.