How to Install Java JDK and OpenJDK on macOS | Set JAVA_HOME and PATH Variables

How to Install Java JDK and OpenJDK on macOS | Set JAVA_HOME and PATH Variables

Liked my video? 👍Buy me a cup of coffee! 🍵    / @tanztalkstech   00:00 Intro 01:16 Download and Install Oracle JDK 04:00 Export the JAVA_HOME variable and add the Java installation to the PATH 06:14 Install HomeBrew Package Manager 07:37 Install OpenJDK using Brew 08:27 Set JAVA_HOME Variable and add the Java installation to the PATH 11:45 Install Latest version of OpenJDK using Brew 14:20 Uninstall OpenJDK using Brew 15:05 Uninstall Oracle JDK 16:18 Install JRE OpenJDK is keg-only, which means it was not installed into /usr/local/ Java is an object-oriented programming language that takes a platform-independent approach to application development by using virtual machines. Java apps are compiled to run on Java Virtual Machines (JVM) regardless of the underlying OS. Java-based apps and applets are created using a software development environment (SDE) known as the Java Development Kit (JDK). Please hit 👍Like Button and Subscribe to the channel to Support me 🙏 Oracle maintains the original, closed source Oracle JDK, but the company also helps develop the open source version of the environment called OpenJDK, which is produced by multiple developers, including Microsoft, Azul, Red Hat, etc. The differences between Oracle JDK and OpenJDK are primarily in licensing, and this tutorial shows you how to install both versions on macOS. This video shows you how to install the Oracle JDK as well as OpenJDK. If you don't need a JDK then you can install Java Runtime Environment (JRE). java -version Install Homebrew on macOS: https://brew.sh/ Install OpenJDK: brew install openjdk@[version] To permanently export the JAVA_HOME variable, add it to the .zshenv file: $nano ~/.zshenv export JAVA_HOME="/usr/local/opt/openjdk/" export PATH="/usr/local/opt/openjdk/bin:$PATH"’ Then save the file (Ctrl + X) $source ~/.zshenv $echo $JAVA_HOME Uninstall JDK: $cd /Library/Java/JavaVirtualMachines $sudo rm -rf jdk-19.jdk Uninstall OpenJDK: brew uninstall openjdk@[version-number] --------- More Tutorials on macOS:    • macOS Tutorials   More Tutorials for Oracle VirtualBox:    • Oracle VirtualBox Tutorials   How to Install Linux Mint 21 "Vanessa" Cinnamon on VirtualBox:    • Install Linux Mint 21 "Vanessa" Cinnamon o...   Install Ubuntu 22.04 LTS in Oracle VirtualBox:    / c5mj2swmn0   Install Java (JDK) On Ubuntu 22.04 LTS, Debian Linux:    • How To Install Oracle Java (JDK) On Ubuntu...   Install Node.js on Ubuntu 22.04 LTS | Install NodeJS and npm:    • How To Install Node.js on Ubuntu 22.04 LTS...   Install and Use Visual Studio Code on Ubuntu 22.04 LTS Linux (VS Code):    • How to Install and Use Visual Studio Code ...   Install macOS 12 Monterey on Oracle VirtualBox:    • How to Install Apple macOS 12 Monterey in ...   Follow me on Facebook: https://fb.me/tanztalks.tech Join our Facebook Group and Post your Problems:   / 769372597093758   Please take a moment to like and comment on my video. It helps me stay motivated! :) --------- VMware Workstation Tutorials:    • VMware Workstation Player Tutorials   Install macOS 12 Monterey on VMware Player:    • How to Install macOS 12 Monterey🔥on VMware...   Install macOS 13 Ventura on VMware Player:    • How to Install macOS 13 Ventura in VMware ...   Install Ubuntu 22.04 LTS on VMware Player:    • How to Install Ubuntu 22.04 LTS on VMware ...   --------- Responsive Travel Theme Website From Scratch Using HTML5 and CSS3 Only | Example 6:    • Create Responsive Travel Theme Website Fro...   Responsive Animated Portfolio Theme Website From Scratch Using HTML5, CSS3, Bootstrap & JavaScript:    • Create Responsive Animated Portfolio Theme...   Web Design/Website Tutorial:    • Web Design/Website Tutorials   Restaurant/Business Theme Responsive HTML/CSS Website | Example 7:    • Create Responsive Modern Business/Restaura...   --------- More on Android App Development: Create Login and Register Android App with Firebase Authentication: 1️⃣   • Login & Register Android App using Firebas...   | 2️⃣   • Login and Register Android App with Fireba...   Create State-District Dependent (Nested) Android Spinners | DropDown List:    • Create State-District Dependent (Nested) A...   Android Basics:    • Android Basics   Follow Me on Facebook: https://fb.me/tanzTalks.tech Instagram:   / tanzeelosama   My Gear: MSI GL65 Leopard Gaming Laptop Intel Core i7-10750H 2.6GHz, 10th Gen (6 Cores) 15.6" FHD (1920*1080), IPS-Level 144Hz 16GB DDR4 RAM, 2666Mhz Nvidia GeForce RTX 2060, 6GB ‎GDDR6 256GB NVMe M.2 SSD + 1TB SATA 7200RPM HDD Windows 11 Home, 64Bit HD Webcam (720p at 30 fps) Per Key RGB SteelSeries Keypad #JDK #OpenJDK #macOS #tanztalkstech #tanzeelosama #tanzTalkstech2 ‪@TanzeelOAnsari‬ ‪@tanzTalks.tech2‬ ‪@tanzTalkstech‬