![mac os jdk 8 mac os jdk 8](https://mkyong.com/wp-content/uploads/2020/03/install-java-mac-jdk16.png)
You can simply use the Finder Go-To Shortcut by tapping CMND+SHIFT+G keys. Upon installation Java JDKs are stored under the following path: /Library /Java /JavaVirtualMachines To select a default Java JDK version it is essential to understand where these JDKs are stored. Step 2 - Setting a default Java JDK version in Bash Profile If you see that there is only one line that is taking the source from your bash profile then that means if you change your bash profile it should reflect on Zsh too. If you are using Zsh, then go ahead and run this command to see your Zsh profile: nano ~ /.zshrc The first step is to understand your bash profile setup. I have broken down the solution into steps for easy understanding: Step 1 - Bash/Zsh Profile This meant that I need to uninstall Java JDK 14 and then reinstall every time I want to run which was a tedious process.
#Mac os jdk 8 for mac#
After diving deeper into Java JDK docs for Mac OS, I came across an article that stated that Mac OS will use the latest installed version of Java JDK as the system default. I still got the output stating Version is Java 14 which meant that even though I had installed Java JDK 8, the machine default was still set to Java JDK 14. After installing Java JDK 8 I tried to run the command. Hence, I went ahead and reinstalled Java JDK 8 by downloading it from Oracle's official website. When I ran into this issue, I had installed Java JDK 14 to run (Project B) and that compiled without any errors, however, when I tried to run (Project A) it would throw a Java error, I understood that the issue came from the Java JDK version upgrade.
![mac os jdk 8 mac os jdk 8](https://cdn.educba.com/academy/wp-content/uploads/2019/03/java10.jpg)
#Mac os jdk 8 android#
It is important to note that I am not running the React-Native project using Android Studio, instead I am using the following command: react -native run -android Another project (Project B) which was developed in Java requires me to use Java JDK 14 or above, this is where the issue occurs. It cannot compile on any Java JDK that is higher than Java JDK 8 because of the Gradle version installed in the application when it was created. One of my client's projects (Project A) is developed using Facebook's React-Native and it requires Java JDK 8 to compile for the Android version. The setup I will explain runs perfectly fine on my machine which is a MacBook Pro with Mac OS Monterey Version 12.2. However, in the case of Node, I use Node Version Manager (NVM) to manage multiple versions. Similarly, different versions of Node are required for running different projects. I am a full-time Software Developer which means I run multiple projects on my machine and each project may require a different version of Java JDK to compile or build.