How to install Java JDK on Mac OS. Set JAVA_HOME

preview_player
Показать описание
If you are new to Java or macOS. This video will help you Install and setup Java on macOS. 4K.

How to install Java JDK Java Development Kit on mac.
Download the Java JDK from Oracle website.
Click on Install
Once installation is complete
open the .bash_profile. If you don't have bash_profile, create it using touch .bash_profile in your home directory.
open -e .bash_profile
export JAVA_HOME=$(/usr/libexec/java_home)
Save and restart the Terminal.

$ echo $JAVA_HOME

java -version
java version "13.0.2" 2020-01-14
Java(TM) SE Runtime Environment (build 13.0.2+8)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.2+8, mixed mode, sharing)

JRE Installation for Mac OS X (64-bit). How to Set $JAVA_HOME environment variable on Mac OS X
Рекомендации по теме
Комментарии
Автор

At 3:54 How to save and close bash profile ? (Keyboard shortcut please)
Never mind, found answer: Press Esc and :x - This Saves and quits the terminal. Thanks.

sainiranjan
Автор

This helps a lot ! Thank you so much !!!

riddhivachhani
Автор

Thank you! for short and to the point video.

kshipraraut
Автор

Wow thank you so much I can now play Minecraft with mods!!!! thanks!!

arcticfox
Автор

After cd /usr/libexec, i did ls -ltr and i did not see java_home. what should i do

swapnabhaskaruni
Автор

Didn't work for me..after editing bash profile i didn't get the path

nihadaily
Автор

If u doing video pls try to show all commands properly...

swathicandy
Автор

Hi, Nice instructions. Thanks for helping us. I followed your steps and found java_home in usr/libexec but not as yours pointing to System/../../ directories. Also after updating .bash_profile and restarting terminal when I am hitting 'echo $JAVA_HOME', I am not seeing anything as before updating .bash_profile. Can you please tell me what is missing at my end.

vnsispl
Автор

Hi I dont see the Java Home added when I do the command ls -ltr . Please explain should I continue even though I dont see it.

karimibrahim
Автор

it wont work does it also work on macbook? i rly need help

neptunwalker
Автор

Didn't work for me..i did ls -ltr and i did not see java_home.

LizzTorres
Автор

Please help me how to install
Java ME CLDC Platform Emulator on netbean IDE 8.2?
I am using Macbook pro 2012, OS Mojave the latest.

When I open the java - new project - Java ME - mobile application, it direct me to pop up
this wizard guides you through a java ME project creation
every CLDC prjects need to have CLDC compatible SDK/platform/emulator assigned to it.
Pressing install SDK/platform/emulator button open Platform installation wizard, which allow you to add a platform
then I click the box "install SDK/platform/emulator"

[No J2ME compatible platform is installed in the IDE. You need to have at least one J2ME compatible platform installed in the IDE.]

After I click the box "install SDK/platform/emulator", there is a box "add platform", and I choose to install "Java ME CLDC Platform Emulator", but when I click next, there is a pop up choose directory to search for platform. I have no idea what is this?

What should I choose? please help. Do you have a video guidance about it? how to solve this J2ME problem?

educationalchannel
Автор

What are the steps if the terminal is zsh and not bash?

sonamsethi
Автор

Hi when I try to locate Java where I Installed using interface, I Cant find it in the library folder . Using Terminal Im able to see it when I run This command $ echo $JAVA_HOME. Please explain why?

limonkhan
Автор

Hi, I am using google cloud terminal. Can you show a way with that? I don't have usr/libexec/. My issue is the same as vnsispl.

charanp
Автор

nahi ho raha ha jdk aur jdk ka download na hi dhikha raha ha kya karu

OneSideGame
Автор

but me not happy my mac your me and your steps are not same me diffrent

OneSideGame