HomeОбразованиеRelated VideosMore From: ProgrammingKnowledge

How to install Java JDK on Mac OS X ( with JAVA_HOME )

2227 ratings | 269627 views
How to install Java JDK Java Development Kit on mac. In Mac OSX 10.5 or later, Apple recommends to set the $JAVA_HOME variable to /usr/libexec/java_home, just export $JAVA_HOME in file ~/. bash_profile or ~/.profile. $ vim .bash_profile export JAVA_HOME=$(/usr/libexec/java_home) $ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home JRE Installation for Mac OS X (64-bit). How to Set $JAVA_HOME environment variable on Mac OS X -------------------Online Courses to learn---------------------------- Data Analytics with R Certification Training- http://bit.ly/2rSKHNP DevOps Certification Training - http://bit.ly/2T5P6bQ AWS Architect Certification Training - http://bit.ly/2PRHDeF Python Certification Training for Data Science - http://bit.ly/2BB3PV8 Java, J2EE & SOA Certification Training - http://bit.ly/2EKbwMK AI & Deep Learning with TensorFlow - http://bit.ly/2AeIHUR Big Data Hadoop Certification Training- http://bit.ly/2ReOl31 AWS Architect Certification Training - http://bit.ly/2EJhXjk Selenium Certification Training - http://bit.ly/2BFrfZs Tableau Training & Certification - http://bit.ly/2rODzSK Linux Administration Certification Training-http://bit.ly/2Gy9GQH ----------------------Follow--------------------------------------------- My Website - http://www.codebind.com My Blog - https://goo.gl/Nd2pFn My Facebook Page - https://goo.gl/eLp2cQ Google+ - https://goo.gl/lvC5FX Twitter - https://twitter.com/ProgrammingKnow Pinterest - https://goo.gl/kCInUp Text Case Converter - https://goo.gl/pVpcwL ------------------Facebook Links ---------------------------------------- http://fb.me/ProgrammingKnowledgeLearning/ http://fb.me/AndroidTutorialsForBeginners http://fb.me/Programmingknowledge http://fb.me/CppProgrammingLanguage http://fb.me/JavaTutorialsAndCode http://fb.me/SQLiteTutorial http://fb.me/UbuntuLinuxTutorials http://fb.me/EasyOnlineConverter
Html code for embedding videos on your blog
Text Comments (297)
shek mohammad (1 day ago)
Bro please tell me how to install java onipad
Vlogs Loyd (8 days ago)
I couldn't see any icon after installing it.. How does it work?
jp last (10 days ago)
The title should be “how to install java & and its features” .
Russ Ian Salas (11 days ago)
i dont see any icon in systems pref. How is that possible?
Zahontay (19 days ago)
**system prefrences intensifies**
kimberly sims (1 month ago)
I can’t find the “Mac OS X “ download
sheetal angane (1 month ago)
I did all the steps but still doesn't show when type ECHO $JAVA_HOME. What should I do?
CellarDoorTV Builds (1 month ago)
Thank you!
Marcos Zorzi (1 month ago)
Great video! Really helpful and easy to follow. Thank you!
Yves Chanel (1 month ago)
Do you have to read every line by line?? went to Kroger and came still on this, Geez.
You are God, thank you!!!
Geórgia Valença (1 month ago)
Yes! Thanks for your help!
Vindi Divin (1 month ago)
Thank you, Amigo
Myles Gmail (1 month ago)
TY!!!!
ImABird (1 month ago)
Thank you soo much
Jewel Burgess (2 months ago)
Your Instruction was perfect, thank you for explaining everything you did.
Ecce Homer (2 months ago)
Thank you - very useful.
Diana Gevorgyan (2 months ago)
Oracle removed Java Control Panel in Java 11. https://stackoverflow.com/questions/53176089/macos-java-control-panel-missing-on-mojave
Javad Ahamad (2 months ago)
any solution for this? Gradle sync failed: Could not run JVM from the selected JDK. Please ensure JDK installation is valid and compatible with the current OS (macOS 10.13.4, x86_64). If you are using embedded JDK, please make sure to download Android Studio bundle compatible with the current OS. For example, for x86 systems please choose a 32 bits download option. (60 ms)
sidharth panda (2 months ago)
It worked. Thanks
Mabeny Johnson (2 months ago)
I followed every instruction you gave and it went well. But where should I find the application for use on my Mac? It's been successfully installed but I just need to open it for use.
Epeli458 (4 days ago)
Same problem for me
Kenedi Novriansyah (2 months ago)
help me unable to locate an executable at "/library/java/javavirtualmachines/jdk-11.0.1.jdk/contents/home/bin/apt" (-1)
Preety Kumari (2 months ago)
ITS really very helpful...thank you
gregjackson11 (2 months ago)
If you're unable to see Java in the preferences, download from here: https://www.java.com/en/download/mac_download.jsp
Mabeny Johnson (2 months ago)
I can see the Java icon in the system references. But how do I uninstall the previous download of Java? I want to be able to open it for use but I can't see where to go next after opening it.
Alex Wiley (2 months ago)
For all the people saying they still don't see Java in their system preferences, what worked for me was installing the ME SDK, located here on Oracle's site: https://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#sun_java_me_sdk-3.0-rr-mac-JPR
WamboBambo (3 months ago)
i love you indian man
Its_Twistz (3 months ago)
i dont know the admin username or password some one help
Vaishali Thakare (3 months ago)
WELL EXPLAINED THANK YOU!
lovebecky (3 months ago)
THANKS!(really needs to 1.25X hh)
GabikPlz (3 months ago)
I'm downloading it now if I died hacked you pay!!
Damian Ruiz (3 months ago)
Thank you for the video, I followed it to the end, I hope to not get that freaking pop-up window asking me to install JDK anymore!
AlinaLycanYT101 Gaming (4 months ago)
I can't find the Java in my system preferences...?
AlinaLycanYT101 Gaming (2 months ago)
I did it...
Alex Wiley (2 months ago)
See my comment above.
Sudharsan (3 months ago)
Reinstall.m same problem.. then fixed
Math (4 months ago)
I am not able to see java control panel in my system preference??
Paolo Milan (1 month ago)
+Alex Wiley They removed Java Control Panel in Java 11.
Alex Wiley (2 months ago)
I messed around with this forever, tried to install previous versions of SDK/JDK all without it working. What DID finally work is installing the SDK for ME, located here: https://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javame-419430.html#sun_java_me_sdk-3.0-rr-mac-JPR
Sodakai (3 months ago)
try re-installing it.
Raket (4 months ago)
+ganesh J Same thing, anyone any ideas how to deal with that? :/
ganesh J (4 months ago)
+Math I got the same problem dude.
Rajesh Peyala (4 months ago)
Very nice video. Thank you so much
Vraj Patel (4 months ago)
not showing java icon in system references so what can i do
Ajibola Abiodun (9 days ago)
thank you +Agu_Para
FLYTAILS MOBILE SALON (16 days ago)
Agu_Para thank you
Sumera Faisal (22 days ago)
Installing Java resolved my issues as well
Noor Ibrahim (24 days ago)
+Agu_Para which java is for ios?
Jacob Dadoun (1 month ago)
thank you +Agu_Para
Andrey Ruzhytskiy (4 months ago)
hey there, installed java and can also check my java version on the terminal but still can't see any java icon in system preferences. am I the only one?
snowmers (4 months ago)
estimated time to download is 3 hours. is it right?
Madison Garner (4 months ago)
OMG you helped me so much thanks
My clean mind (4 months ago)
Thank you so much !!!
Anjali Vas (4 months ago)
Thank you! very helpful
Suhas Nayak (4 months ago)
Not able to find the Java icon in system preferences, but java is installed(checked via command line). How do i get back that symbol in system preferences ?
Joker3Designs (1 month ago)
I can't find that either
Alex Wiley (2 months ago)
+Alpna Sharma See my comment above
Alpna Sharma (4 months ago)
Did u find any solution for this?
akshay kumar (4 months ago)
When I type echo $JAVA_HOME it’s not showing me the library or path. What should I do now?
Aadi Gupta (4 months ago)
Hey I have problem in installing in Java on Mac book means Java is not install properly on it. It cause requires permission but after that it still loading so please help me
daenjel kirigo (1 month ago)
did you get the solution to that?
Reksmey Ok (4 months ago)
Thank you for your video.
VG fluberdigle (5 months ago)
Thanks man this helped
_ blagh (5 months ago)
could you teach me how to undo the installation? I followed ur steps, but I wanna know how to undo it just in case I had to ._. is it gonna ruin my MacBook Air.. it's kinda scary and I have no experience with this what so ever. thanks for the video, it was fun following u
Kath G (5 months ago)
his accent is great ya know
Danial Abu Bakar (5 months ago)
Thanks for the amazing video!! Super helpful especially for mac beginners like myself
YaNa (5 months ago)
it's not opening..
Dragonait 999 (5 months ago)
for me it says akami, what is it?
Al Alim (5 months ago)
UNABLE TO EXPORT JAVA INTO JAVA_HOME despite doing all the steps.. I already had .bash_profile on the list however, it was added by anaconda installer . The message displayed on the editor said : # added by Anaconda3 4.4.0 installer I continued typing the command as instructed : export JAVA_HOME=$(/usr/libexec/java_home) saved it, and a pop up message came out said that I have no right to write on the .bash_profile, since I didn't own it, it gave me an option to make a duplicate, and I did. Then I paste the instruction in the duplicate version, save it, and another pop up came out, said that saving using "." extension (.bash_profile) will cause the file to be hidden. So first I saved without "."extension, and close everything, reopen the terminal writhe the echo $JAVA_HOME press enter, and I didn't get the location, only an empty space as it hasn't been created yet. Then I tried to ignore the "." extension naming method, still it yield nothing.... Oh, I also tried to create .bash_profile using the instructed command : touch .bash_profile however, it wasn't allowed (touch: .bash_profile: Permission denied) Anyone, could you please help me to solve the problem....I would highly appreciate it.. Thanks in advance
Al Alim (5 months ago)
I don't know why but after several times trying again, it fixed on its own, so thanks for the great tutorial, keep on updating!
ali azizi (5 months ago)
very helpful thanks
Egan Early (5 months ago)
followed all the steps up to install....its not popping up in my system pref, but its coming up in my terminal
Alistair Ramage (5 months ago)
Had the same problem , but the fix is to install actual java as well as the sdk after that it should come up.
mani kanta (5 months ago)
Thank you! I'm new to mac, followed your suggestion's while installing.
Swati Daniels (5 months ago)
Thank you so much. I just was having a hard time setting the JAVA HOME on my mac OS. Thanks
headshiphero (6 months ago)
Hello. New to programming and am in the process of learning Java. Quite unfamiliar with the Terminal (I'm mostly working on a PC). Your video was *much* more helpful than most of those I saw first and really helped me understand what all these random terminal commands mean. Chapeau sir and thank you
Veruka Samma (6 months ago)
Excelente tuturial, very easy to follow! thanks a Lot!
whizzard blizzard (6 months ago)
Im noob here. Can anyone tell me what’s the purpose of this Java Home? I just want to install the Java software for class, is the Java Home a requirement? What does it do?
Zoe Lau (6 months ago)
This video saved my life. I have no understanding of Java and also terminal so without your video I think I would never install Java on my mac successfully. Thanks buddy! ^^
Nobby Why (6 months ago)
Cool. One of the best tutorials I'd ever watched. Your step-by-step approach is Very helpful for people like us (I guess we are your targeted audience) who have little understanding of using terminal and installing apps like Java, etc. Thank you heaps. One question though, following everything through successfully to 14:30 when I open my .bash_profie I have already an entry there: export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH (I use MAMP as my dev server) Using echo$JAVA_HOME command in terminal gives me: JAVA_HOME: Undefined variable Stuck here. I tried to look up some explanation on the internet but to no avail. Thanks
Ben Grambs (6 months ago)
Thank you so much! Everything worked
Samar Debnath (6 months ago)
After quiting the old terminal...when I opened the new terminal nd enterd echo $JAVA_HOME it's gives me nothing...maybe I have not typed .bash_profile correctly...so how to fix it
Mohit Bhatt (6 months ago)
should be typo in .bash_profile, copy exactly what he has mentioned in description. make note: its 'usr' not 'user'. Edit it again and should be good.
Tuvshinjargal Byambajav (6 months ago)
Thank you
RidinSpinaz04 (6 months ago)
Thank you.
jackson debolt (6 months ago)
awesome video very helpful
kajal wassan (6 months ago)
hello sir I phase problem in end when we create bash file there is an error of regarding operand expected
Fearless Brittany (7 months ago)
try: export JAVA_HOME=$(/usr/libexec/java_home) and then just typing $JAVA_HOME instead of echo $JAVA_HOME
JEREMIAHVLOGS (7 months ago)
Is there a was to put this on a flash drive
Mauricio Ruiz (7 months ago)
-bash: JAVA_HOME=${/usr/libexec/java_home}: bad substitution this is what the new terminal showed me after I Edited the .bash_profile file, does anyone know why?
Nobby Why (6 months ago)
would be good to have a link to some forum where people can discuss their problems and help each other out.
Suzana Isaku (6 months ago)
This happend to me too, i installed JAVA JDK in the same way like tutorial,but now i can not open the application. Can anyone tell me what to do or what is wrong
The Code County (7 months ago)
Hi ProgrammingKnowledge, My name is Mohit Jain. I am writing a blog for Java “https://thecodecounty.com” (just started). I need your permission to use your videos where you explain about setting up environment variables for Mac, Windows and Ubuntu. Do I have your permission to use these? Regards, Mohit Jain
krishna sanju (7 months ago)
awsome video dude
presentlymine (7 months ago)
Helped me. Thanks :)
AHMED BAAHMED (7 months ago)
Thanks so very much brother!
Kiki Chang (7 months ago)
Thank you so much! I had a hard time looking for decent videos on installing java on Mac. This is by far the one with the clearest instructions. I successfully installed Java and Netbeans IDE with the help of your tutorials : )
Phoenix and Tenken (7 months ago)
thank you so much
SS (8 months ago)
Thank you pal! Helped me! :-)
Amr Aboeleneen (8 months ago)
very helpful thanks
Mauro Pizziolo (8 months ago)
Thank you; out of all the super-duper champions of informatics you've been the only one I could understand., and that is because you're kind. Thank you
Siddhartha Bhadriraju (8 months ago)
hi bro I have Java JDK 10 in my Mac book air.when I'm trying to run the web project eclipse is saying that ERROR: JVM Not Found , Fatal Exception Occurred.i'm unable to. solve this error please help me.i have tried uninstalling and reinstalling eclipse, java and apache but it's not working please suggest me how to solve this issue
Yiğit Öztürk (8 months ago)
Hi my friend lagılugulagılugu
De'Avione Mellieon (8 months ago)
how do we know if it works if you don't play minecraft??????
Jason Born (8 months ago)
Thx
Angela Rucci (8 months ago)
This is great! Exactly what I needed to set my JAVA_HOME variable. Thank you!
Jacob ManCity (8 months ago)
Good video
ElEvEn 011 (8 months ago)
thanks man i have installed already but i didn't know it and i found thanks so much
Jessica Stetson (9 months ago)
Very helpful -- thank you.
TheSound OfSusiq (9 months ago)
thanks man
Grace - Yueran Yu (9 months ago)
Thank you so much! I finally know how to set the home directory for Java! Quite helpful!
Harsh Sharma (9 months ago)
super explained everything for the first time mac user
supreeth raghavendra (9 months ago)
Awesome
NIk (9 months ago)
amazing!!!!many thanx!!!
Ashley adventures (9 months ago)
The version of my computer was sadly not enough to install so it did not work thank you anyway
gurpreet (9 months ago)
I did everything as you said but after closing terminal and again giving echo $JAVA_HOME does not give home location. again empty. can you please help me
Nobby Why (6 months ago)
my .bash_profile is already showing export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH and echo $JAVA_HOME tells me that it is an Undefined Variable so obviously something wrong with people who use MAMP as their dev server Couldn't find any solution but NETBEANS IDE is out of reach because of that. Bummer
ChrisHe (6 months ago)
in your EXPORT= statement, make sure you have a leading / before usr, so $(/usr/libexec/java_home)
Carsonjbaum (9 months ago)
when i double click on the pkg it has a verifying loading screen and it does nothing i need help
Avaneesh Avasthi (9 months ago)
thanks for the help
thanks so much
D A (9 months ago)
The things I do to get optifine for Minecraft...
K Sreenivas (10 months ago)
Please do all videos in mac bro... Please
Chanuth Lanerolle (10 months ago)
Bro stop talking sooooo much I got pissed of only to download Java watching this but still goood vid..
Nobby Why (6 months ago)
it's called step-by-step. If you know it already, why watching the video? Strange professionals out there.
Audrey T (10 months ago)
https://stackoverflow.com/questions/6588390/where-is-java-home-on-macos-sierra-10-12-el-capitan-10-11-yosemite-10-10/6588410#6588410 . for anyone having trouble.

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.