cordova-docs
cordova-docs copied to clipboard
Should recommend using OpenJDK instead of Oracle JDK
Issue Type [x] Bug [ ] Feature Request
Priority [ ] Minor [x] Major [ ] Critical [ ] Blocker
Environment
- OS: all
- Browser: WebKit
Description
As discussed in apache/cordova-android#637, updates to Oracle JDK 8 including security updates will not be licensed for commercial use after January 2019. Recommended solution should be to use OpenJDK, as discussed in apache/cordova-android#637.
Update is needed in the following section: https://github.com/apache/cordova-docs/blob/45ee7b28111928f5d81b9f463f6d273326067770/www/docs/en/dev/guide/platforms/android/index.md#java-development-kit-jdk
I think this should to be done before we make the next major release for Cordova 9 (apache/cordova#10).
I recently worked out all the steps to get OpenJDK 8 running for Cordova and Android Studio on a new mac, and I documented it all here — I'm adding it here so it may helps others find it, until the docs are updated. https://github.com/apache/cordova-android/issues/637#issuecomment-514065674
Closing as stale.
But I think we should continue referencing the official Java source. It's opinionated to reference other java runtime implements over Oracle's JDK.
Downloading oracle jdk now requires an oracle account (nooooope!), so if openjdk works just as well, it will be easier for a new user to install openjdk
Downloading oracle jdk now requires an oracle account (nooooope!), so if openjdk works just as well, it will be easier for a new user to install openjdk
If anything we should just remove the Oracle link and just simply reference JDK without making any mention (or link) to any particular JDK implementation. Which further enforces my "opinionated" concern. My previous comment about keeping Oracle is just because Oracle is the governing body around Java.
In reality I know people who use Oracle JDK, AdoptJDK, and OpenJDK and I myself also use OpenJDK. Android Studio uses an IDEA Intellija custom build that is derived off of OpenJDK. In theory, as long as the JDK implementation implements the specification properly any implementation should work, given you're using the correct specification version required by the android build tools.
This is not an easy toolchain to get installed and running. It took me all day yesterday to just get the basic sample building on android.
It would have saved me a lot of time yesterday if I knew I needed to install exactly open jdk 17 and not 20. I don't know why you wouldn't document in the 'quick' install document the easiest steps to quickly install this toolset. 🙄
(Some of the install pain was also because it was not obvious in the install docs that I needed to install the android command line tools also. Additionally confusion over what environment variables were supposed to be ANDROID_HOME / ANDROID_SDK_ROOT)
Excuse the frustration from a day wasted due to gaps in the documentation, but seeing the active avoidance of making your docs useful when people are pointing out exactly what needs to change to more easily onboard new users to your software is infuriating.