-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Java JDK version to use given Oracle licensing changes #637
Comments
Good question @KevinKelchen! Did you investigate a bit how Cordova could be used together with OpenJDK? |
Hi @janpio! I appreciate your responsiveness! I have yet to actually experiment with using alternative JDK implementations for Cordova Android development. I thought I would ask here first to see if there was already official guidance because I thought that this topic may have already been discussed given its legal/financial implications. :-) I'm not certain if a version of OpenJDK would work for Cordova Android or if there's an implicit dependency on the Oracle implementation. If an OpenJDK version will work, what distribution will work the best? I wonder if we could somehow use the OpenJDK that comes with Android Studio (if it's JDK 8) or if it would need to be installed separately or require a different distribution (perhaps desirable for decoupling Android Studio from being a Cordova Android requirement). I may not get much time to investigate this for the next couple of months given higher priorities. However, if anyone else who comes across this thread has insight to share, please don't be afraid to comment! |
(Just a note for anyone here reading this: My comment was made as an individual, not as a representation of all Apache Cordova maintainers and committers. I have no idea if people working more frequently with |
I would recommend using OpenJDK 8, which seems to be still updated with free support. This means we need to update the download info in the following places:
I added the bug label, think this should be fixed before we make the major release for Cordova 9 (apache/cordova#10). I posted the following answer on StackOverflow how to install and use OpenJDK 8 on mac, using Homebrew: https://apple.stackexchange.com/questions/349465/how-can-i-upgrade-from-oracle-jdk-8-to-openjdk-8-using-homebrew/349466#349466 As a side point, I think use with newer OpenJDK version is not supported by Android build tools: https://stackoverflow.com/questions/49788102/which-java-se-versions-work-with-android-studio-3-1 P.S. I tested build and run on Android with OpenJDK 8 with both latest and nightly Cordova-Android versions on my mac. |
Thank you so much, @brodybits! 😃 |
Hi all, Here's what worked for me as at July 2019, which is a TL;DR from all the links above along with some Google-fu. I can confirm this works on a clean MacOS Mojave, after first installing Android Studio 3.4.2 and Cordova 9.0.1. Hope this helps someone. Step one: Install OpenJDK 8 from brew.
Step two: Update the environment variables to point to this version of the JDK (put the following into your
Now close and re-open your terminal window. Step three: Now you should be able to run Notes:
I hope this helps someone. |
I think we should consider updating the following:
I cannot promise when I will get a chance to work on these badly needed updates, just added the help wanted label. P.S. Many thanks to @sc0ttdav3y and others for the helpful comments so far! |
Just wanted to pitch in that my primary work machine uses OpenJDK and I never once had a java related issue with
|
@breautek ... ah, it's because I was using the latest version of OpenJDK which was 13. I just assumed the latest version would work but I guess I have to manually install the correct version. |
Yes, Java 8 is specifically a requirement from the android sdk 😄 Btw, Is there anything required to resolve this issue? |
Closing due to inactivity. I believe the question has been answered. |
Did something change recently with open JDK support? I thought I used it in the past. Now the verison check fails no matter what version of open JDK I use.
Where as when I run java version
Versus javac version
|
You either don't have JDK 8 installed or you have JDK 16 appears before JDK 8 in your path. Not sure about Zulu, but on ubuntu the package name is |
Hi 👋 ,
I have a question regarding the version of the Java JDK we should be using in light of Oracle's recent Java licensing changes.
The official Cordova documentation for installing the JDK links to this downloads page on Oracle's site for Java JDK 8.
Somewhat recently Oracle announced that JDK 8 will not get new security updates after January 2019 if it's used for business/commercial purposes. This post tries to break down what the implications are. Other businesses are making adjustments to their applications because of the licensing changes.
Searching online it looks like Android Studio, for a while now, has shipped with OpenJDK...
Will the recommendation for Cordova Android change to an OpenJDK version of the JDK? Regardless of whether or not that recommendation changes, are OpenJDK versions supported in Cordova Android for those who do not wish to pay expensive licensing fees to Oracle in order to comply legally as well as to receive security updates with regard to the Cordova Android development they do for their business?
Thank you so much for your time! 😃
The text was updated successfully, but these errors were encountered: