LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   OpenJDK vs Oracle's JDK (https://www.linuxquestions.org/questions/slackware-14/openjdk-vs-oracles-jdk-4175678591/)

burning 07-12-2020 10:53 AM

OpenJDK vs Oracle's JDK
 
I don't fully understand the situation with Java being closed source and an open source alternative being available, but I'm in need of installing Java. And the option to use an open source alternative seems tempting as I'd like to support open source where I can. So I'm curious. Is it advised to bother with Oracle's JDK? or is OpenJDK just fine for running and developing Java programs and applications?

pan64 07-12-2020 11:23 AM

In general yes, openJDK is fine. There can be cases where it is not acceptable (or just will not work), but others in this forum will tell you there are no such cases.

bifferos 07-12-2020 12:38 PM

If you are using SBo package builds they may require one or the other. Not all slackbuilds just look for 'java' of a certain version (although these days they probably should) but insist on a particular one. So I'd look for the one that's going to satisfy the dependencies of any packages you'll use.

There's no drawback to using Oracle if it's not for commercial/business use.

uiopqwerty 07-12-2020 10:40 PM

In general you can run OpenJDK. Some applications suggest using Oracle JRE in production - e.g. the recommended production settings for Apache Cassandra require this. If your applications aren’t running in production, you can fairly safely use OpenJDK or another free distribution of Java. As others have mentioned, it is prudent to make sure you’re adhering to Oracle’s licensing if you use their JRE.

Re: Java being closed source - there was a time when this was true, but the Java language is now fully open source, and OpenJDK (which is the reference implementation of Java) is released under GPLv2 (+classpath exception) :)


All times are GMT -5. The time now is 05:38 PM.