From 80a4aa5fae96320d151318cc5976f40bbf389fe4 Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 18:44:49 -0500 Subject: [PATCH 1/7] add installing Java from website --- android/configure_java.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/android/configure_java.md b/android/configure_java.md index a0f97ce..70a107e 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -29,7 +29,20 @@ brew install java11 ``` ### Method #3: install from website -TODO +You can install Java from +[Oracle]([url](https://www.oracle.com/java/technologies/downloads/#java8-mac)) +using this link. + +Installing the JDK: +* Navigate to `Java SE Development Kit 8u341` and click `macOS`. +* Download the package named `jdk-8u341-macosx-x64.dmg`. Oracle requires you to + make an account in order to install the JDK. Follow the instructions and + confirm your email. +* Open your `.dmg` install and follow the installation wizard. +* Add the following line to your `~/.zshrc` or equivalent shell startup file: `export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home"` + +That's it! As explained in Method #1, `$JAVA_HOME` is the environment variable +for UNIX environments that points to your JDK installation. ## Troubleshooting ### Get Java version From ad3af8204ab0525ca489289a39cec703afff69b6 Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 18:54:44 -0500 Subject: [PATCH 2/7] fix /usr/local/Cellar/openjdk/19/libexec/openjdk.jdk/Contents/Home pointer --- android/configure_java.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/android/configure_java.md b/android/configure_java.md index 70a107e..7af1673 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -39,10 +39,12 @@ Installing the JDK: make an account in order to install the JDK. Follow the instructions and confirm your email. * Open your `.dmg` install and follow the installation wizard. -* Add the following line to your `~/.zshrc` or equivalent shell startup file: `export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_341.jdk/Contents/Home"` +* Add the following line to your `~/.zshrc` or equivalent shell startup file: `export JAVA_HOME=$(/usr/libexec/java_home)` That's it! As explained in Method #1, `$JAVA_HOME` is the environment variable -for UNIX environments that points to your JDK installation. +in UNIX environments that points to your JDK installation. +`/usr/libexec/java_home` is a symbolic link that points to matching Java VMs +installed in your environment. ## Troubleshooting ### Get Java version From 8a3c9322ace1196b9139d20db55504c057a63e3c Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 18:57:43 -0500 Subject: [PATCH 3/7] fix link to Oracle --- android/configure_java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/configure_java.md b/android/configure_java.md index 7af1673..a0130da 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -30,7 +30,7 @@ brew install java11 ### Method #3: install from website You can install Java from -[Oracle]([url](https://www.oracle.com/java/technologies/downloads/#java8-mac)) +[Oracle](https://www.oracle.com/java/technologies/downloads/#java8-mac) using this link. Installing the JDK: From e3dc7546097855ab9e65fde394dd80120ad8f7d8 Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 19:01:10 -0500 Subject: [PATCH 4/7] address vague instructions --- android/configure_java.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/configure_java.md b/android/configure_java.md index a0130da..552496c 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -38,7 +38,7 @@ Installing the JDK: * Download the package named `jdk-8u341-macosx-x64.dmg`. Oracle requires you to make an account in order to install the JDK. Follow the instructions and confirm your email. -* Open your `.dmg` install and follow the installation wizard. +* Launch your `.dmg` installer and follow the installation wizard. * Add the following line to your `~/.zshrc` or equivalent shell startup file: `export JAVA_HOME=$(/usr/libexec/java_home)` That's it! As explained in Method #1, `$JAVA_HOME` is the environment variable From f14e0de3fbe8e58f9f6b45dde96f2532648afbeb Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 19:02:44 -0500 Subject: [PATCH 5/7] verify correctness with gradlew --- android/configure_java.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/configure_java.md b/android/configure_java.md index 552496c..f2dc18c 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -41,7 +41,8 @@ Installing the JDK: * Launch your `.dmg` installer and follow the installation wizard. * Add the following line to your `~/.zshrc` or equivalent shell startup file: `export JAVA_HOME=$(/usr/libexec/java_home)` -That's it! As explained in Method #1, `$JAVA_HOME` is the environment variable +That's it! To verify correctness, open a new shell, navigate to a directory with Android source code, and type `./gradlew tasks`. +As explained in Method #1, `$JAVA_HOME` is the environment variable in UNIX environments that points to your JDK installation. `/usr/libexec/java_home` is a symbolic link that points to matching Java VMs installed in your environment. From 7b7f56392df63247f90652d9ebb656dddb895907 Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 19:04:22 -0500 Subject: [PATCH 6/7] separate into paragraphs --- android/configure_java.md | 1 + 1 file changed, 1 insertion(+) diff --git a/android/configure_java.md b/android/configure_java.md index f2dc18c..4ea3716 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -42,6 +42,7 @@ Installing the JDK: * Add the following line to your `~/.zshrc` or equivalent shell startup file: `export JAVA_HOME=$(/usr/libexec/java_home)` That's it! To verify correctness, open a new shell, navigate to a directory with Android source code, and type `./gradlew tasks`. + As explained in Method #1, `$JAVA_HOME` is the environment variable in UNIX environments that points to your JDK installation. `/usr/libexec/java_home` is a symbolic link that points to matching Java VMs From d18677ae6faf26ce2bb3235f510a25db33dd4744 Mon Sep 17 00:00:00 2001 From: walid Date: Mon, 10 Oct 2022 19:12:58 -0500 Subject: [PATCH 7/7] reference java doc for install --- android/configure_java.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/configure_java.md b/android/configure_java.md index 4ea3716..b94cd00 100644 --- a/android/configure_java.md +++ b/android/configure_java.md @@ -48,6 +48,11 @@ in UNIX environments that points to your JDK installation. `/usr/libexec/java_home` is a symbolic link that points to matching Java VMs installed in your environment. +If you are having trouble, please make sure to read this [Java +Doc](https://www.java.com/en/download/help/mac_install.html) on how to install +Java on your machine. Although this documentation highlights how to install the +JRE, installing the JDK follows the same steps. + ## Troubleshooting ### Get Java version To see what version of Java you have installed, run: