![install jdk on mac os install jdk on mac os](https://bell-sw.com/assets/images/installer/macos-11.0.3-2.png)
Most people around me are using java 8 or 11, so i will stay with that here as well.
#Install jdk on mac os install#
Many of the package managers (sdkman, brew) have Java JDK and they like to copy the install files to their special custom locations, which is a bit more confusing to me, but useful for them to help you switch between multiple versions installed in parallel. There are many different ways to install java, at the end of the day they all really do the same thing, just hide it/do it for you. These are all ran (“sourced”) at slightly different times, and while all will probably work, we don’t care. Also available is zprofile, zlogin, zshenv we will just use zshrc. we will be placing all our environment variables in. Just know that java is not installed here, nor does your machine come with java built-in.Īlso, Mac recently switched from bash to zsh as the default shell. this doesnt exist anymore, but the /usr/bin/java directory does still exist so that’s kinda confusing. MacOs used to come with a pre-installed version of java, called Apple Java. but, if you start running into trouble, it will be more difficult to troubleshoot something you don’t understand. To some, it may be easier to just download an installer, either a dmg or pkg file. this understanding will also help with troubleshooting java installs for others. there are infininte variations to this but i wanted to do a complete manual install from A-to-Z so i understand what all the installers are doing under the hood. introįirst thing is a bit of background to understand how it’s “supposed” to work. The first step is to actually get the darn thing installed, which i will try to explain and walk through below.
![install jdk on mac os install jdk on mac os](https://i.stack.imgur.com/jNKeZ.png)
Recently i had the situation where i needed to help a fellow tech enthusiast set up their Mac environment for java development.