Do I understand correctly that for ordinary developers, in fact, there are no restrictions on the use of Java? That is, all responsibilities for licensing fall solely on the platform developer (for example, on Google, if we are talking about Android). And the developer will have some responsibilities only if he is also the author of the platform (for example, some kind of embedded solution, when all parts of the system are developed by one organization). If the JRE is already under the required platform, then the developer can freely develop under it in Java (some restrictions may already be imposed only by the developer of the platform, but not Oracle itself). Right?

Additional question: OpenJDK is distributed under the GPL. Does this mean that if the platform developer will use OpenJDK (and will open all the changes needed to adapt to his platform), then Oracle should not do anything? As far as I understand, this is why Google plans to switch Android to OpenJDK (so that Oracle does not pay anything, despite the fact that its solution is embedded, and not for "general-purpose computers".

And finally: can the author of a Java program distribute the JRE along with it (provided that the JRE already exists under this platform) so that the user does not have to install Java on his own? Or the only course of action in the absence of an installed JRE (and if for some reason it is impossible to use OpenJDK, which in theory can be distributed absolutely freely) - send the user to the Oracle website?

  • In any case, you can simply do not talk too much about what you use, and no one pays attention there is a license, there is no license. - Sergey
  • one
    So it’s true, but if you supply someone with a Java program, the fact of using it will be obvious. - kiv_apple
  • The user, if he does not want to lose a wonderful program, also let him keep his mouth shut - Sergey
  • one
    In my opinion, the platform developer must comply with the GPL if it uses open jdk sources, and pass tests from TCK if he wants to call his creation java-compatible (android, for example, is not compatible). An application programmer can use the standard library (there is a GPL with linking exception for this). If you need to distribute the application along with the Oracle JRE, then there are conditions in the license (section D). Well, or to the side Azul Zulu look. - zRrr
  • I implemented a series on Java (Oracle JRE) - demo can be downloaded before purchase. The license does not restrict the use of the JRE as part of the supplied code. Java SE FAQ - java1cprog 6:54

1 answer 1

OpenJDK is not distributed under the GPL , but under the GPL with classpath exception . Thus, when you write your code that uses the standard library code, the GPL terms do not apply to your code and you are free to choose the license of your code completely freely. GPL with classpath exception is close to the LGPL . The difference between them is that the LGPL allows others to study and modify your code, and the GPL with classpath exception does not add this feature, leaving it to the discretion of the authors of third-party code. Thus, the GPL with classpath exception is better suited for writing commercial software.