15

I am currently making a video game in Java that will most likely be distributed through Steam. Of course, many Steam users won't have Java already installed in this case. If this happens, I can either have a small native launcher that shows an informative dialogue telling the user they need to install Java, or simply bundle my own Java runtime environment (specifically OpenJDK 8) with my game. My game will be closed source, however it is based on an open source (BSD licensed) game engine.

I did look though OpenJDK's license. It is a GPL project which means that anything linking to it needs to be GPL as well. However, they also have the classpath exception. I'm not sure if the linking portion applies because my code isn't linking to it any more than it would be with or without bundling it. As far as I know, the classpath exception doesn't cover this use case.

There is a similar question on Stack Overflow, however that refers to the situation where an application is developed with OpenJDK, I am referring to distributing with OpenJDK.

Ben Waters
  • 103
  • 4
john01dav
  • 879
  • 1
  • 7
  • 14
  • 4
    Have you read the **[OpenJDK license](http://openjdk.java.net/legal/gplv2+ce.html)** or looked for **[similar questions](http://stackoverflow.com/q/4143635/439793)**? This question is on-topic because it is about licensing your own software: however, **[sharing your research](http://meta.programmers.stackexchange.com/q/6559/22815)** will attract better answers. –  May 10 '15 at 17:54
  • Yes I have. I've edited the question to reflect this. – john01dav May 10 '15 at 17:59
  • Also see: **[What does "GPL with classpath exception" mean in practice?](http://programmers.stackexchange.com/q/119436/22815)** –  May 10 '15 at 18:01
  • I read that question and it's answers. I'm not sure how it really relates to this question other than being on a similar topic. – john01dav May 10 '15 at 18:14
  • Does it have to be OpenJDK? Some other Java runtime may allow distribution of their binary runtime without adding GPL terms to your distribution. See e.g. https://www.java.com/en/download/faq/distribution.xml – Brandin May 10 '15 at 18:54
  • Not necessarily, however I know from past knowledge that the Oracle JDK doesn't allow redistribution. – john01dav May 18 '15 at 01:41
  • And perhaps also see: http://programmers.stackexchange.com/questions/47032/can-i-use-gpl-software-in-a-commercial-application – quickly_now Nov 27 '15 at 08:02

2 Answers2

4

This is an important question, especially when you consider the fact that Oracle has changed their licensing and distribution agreements starting with Java 9, 10, & 11.

JDK --> Java Development Kit.

JDK's are not a 'runtime' distribution -- A JDK is a developer's distribution that happens to contain a runtime as part of the bundle. JDK's are not 'freely distributable' by the developer, they are licensed to the developer. If you read the EULA for your JDK, you will see that it comes with restrictions on re-distribution.

JRE --> Java Runtime Engine.

Runtime's are (almost always) free to download and distribute provided you adhere to the EULA for the JRE.

JDK's and JRE's are licensed and distributed separately and independently of each other.

Finally, you need to know that you are generally not allowed to distribute 'parts' or components of a JDK either -- this means that you are not supposed to extract the JRE from your installed JDK and distribute or bundle it separately.

The best practice is to separate development from deployment.

  • You develop on a JDK and deploy the project
  • The deployment has a dependency on a JRE
Bent
  • 2,566
  • 1
  • 14
  • 18
Greg Patnude
  • 96
  • 1
  • 4
-1

From what I read in the license you are freely able to redistribute the program, even charge to distribute it.

But as I have personal experience with releasing a Java game (not paid though) I find its better to just tell the user that Java Runtime Environment is required either on the distribution source (give them a link to the Java download) or have the application give the user an error.

Robert Harvey
  • 198,589
  • 55
  • 464
  • 673
  • 2
    Can you give some reasons on **why** letting the user download might be better? – ziggystar Nov 27 '15 at 08:30
  • 3
    Well, I already have (multiple) JREs installed; having each application bundle 150+ MB "just in case" seems rather pointless to me. Also, having a app-specific JRE leads to issues like this: "my JRE has these tweaks, why doesn't it work in YOUR app?" http://stackoverflow.com/a/21417887/19746 – Piskvor left the building Nov 27 '15 at 09:23