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.


2 Answers 2


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

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.

  • 2
    Can you give some reasons on why letting the user download might be better?
    – ziggystar
    Nov 27, 2015 at 8: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?" stackoverflow.com/a/21417887/19746 Nov 27, 2015 at 9:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.