Unity Hub CLI - OpenJDK

Hello,

With the Unity Hub CLI,
In the headless help of the app, I can’t find the command to install OpenJDK for Android.
Doesn’t work with “-m openjdk” logic.
Also, the command “-m standardassets” seems broken.

"C:\Program Files\Unity Hub\Unity Hub.exe" -- --headless install-modules --version 2019.2.17f1 -m openjdk -m standardassets -m android -m android-sdk-ndk-tools

Gives:

Missing module openjdk. Skipping..
Missing module standardassets. Skipping..

The other modules are fine.

Thank you.

The same here, in version 2019.3.0f6 OpenJDK is not installed anymore when installing android + android-sdk-ndk-tools modules

Same here, too. Very frustrating.

I ran into the same problem when upgrading from 2019.2 to 2019.3.

I eventually found that the OpenJDK module is called android-open-jdk which you need to install along with android and android-sdk-ndk-tools.

1 Like

Hi guys, I found the solution. Just like @jamiebrynes kinda said, the OpenJDK doesn’t automatically install even when installing the Android Build Support. In my case, I discovered the circled checkbox wasn’t check. This window appears in Unity Hub>Installs>(Right-click on the desired version)>Add Modules. You just need to toggle the checkbox and click “Done”.

Hope this helps!

I still have the problem !!?? It tries to install and after a while nothing happens and the check box is unchecked and also in the preferences it says “JDK not installed” ??
Thank You !!

1 Like

I have your same problem :L Unity Hub “Download” and “Install” OpenJDK
5746435--604048--upload_2020-4-22_4-1-22.png
But after the “Installation”, OpenJDK still doesn’t exists
5746435--604051--upload_2020-4-22_4-11-1.png
5746435--604054--upload_2020-4-22_4-11-40.png5746435--604057--upload_2020-4-22_4-11-50.png

Same problem here guys. Anyone managed to fix this?

Grr. After searching online, and going back to the Java website searching for answers, I stumbled upon this: 5806273--614071--upload_2020-5-5_20-23-44.png

It seems those of us who are having trouble downloading the JDK might be in the unauthorized countries. I downloaded JDK 14 just fine, but Unity rejected it, and requested JDK 8, which is how I found this charming notice.

1 Like

UPDATE: StackOverflow for the win! java - How to install openJdk 8 in windows 64 bit os - Stack Overflow

Searched a bit more, and found this post on stackOverflow. You can follow the links and download Amazon Correto JDK 8. I downloaded, and installed it to the recommended directory (not unity; something like c:\program file\Amazon Coretto). I restarted my project from Unity Hub, and in Edit → Preferences → JDK, it had already automatically detected the presence of JDK 8. I just accepted it, and built my game.

PROBLEM SOLVED.

Same problem just happaned to me yesterday when i updated Unity from 2019.2 to 2019.3, is there any solution to this problem ?

SOLVED :

I’ve found the solution of this problem, i think this is a bug from UnityHub, so the only way is to install openJDK 8 (1.8) manual, Here the steps i did :

  1. Go to download openJDK 8 (1.8) from Oracle this is the LINK : https://www.oracle.com/java/technologies/javase-jdk8-downloads.html

  2. Install it after it’s all DONE.

  3. Go Open Unity => Edit => Preferences => External Tools => Uncheck JDK Installed with Unity and click Browse => Go to this path “C:\Program Files\Java\jdk1.8.0_251”.

i hope this helped you guys <3.

Hi previous answer almost work for me, still had some issue, but this helped me:

Download newest sdk 8 (for this moment sdk 8u251).
Install it
Go to the folder where it been installed.
There should be 2 folders jdk and jre.
Open jdk folder, copy everything from it and paste it in default unity jdk folder.

If you don’t know how to find path: open unity → Edit - > Preferences… → External Tools → JDK Installed with Unity (copy path).

Hopefully it’s gonna help you guys.

I found a solution, If you already have the JDK installed, just put the path of JDK in Unity.

Edit → Preferences → Android

5868403--624547--upload_2020-5-18_20-57-17.png

I’m working on a cruise ship and our internet connection is over satellite. As such our exit node is in Dubai and often Google switch to the Arabic language as per IP address it sees it as the current location. So, this can explain the country issue (in my case). Still, this is annoying. At the moment, I don’t have any VPN subscriptions to this theory.

I know this is an old thread, but it’s one of the top results in search engines, so I thought I would share. I downloaded OpenJDK 64-bit for Windows from this website: Upstream | AdoptOpenJDK - Open source, prebuilt OpenJDK binaries. I just extracted it to c:\Java (it can be anywhere you want) and pointed Unity to it like others have suggested.

here what i use to install all child module “C:\Tools\UnityHub\Unity Hub\Unity Hub.exe” – --headless install --version %Version% -m android --cm -m webgl -c %changeset%