With Oracle starting to collect license fees from different customers for using Java SE I've asked myself if the usage with a server runtime is still free. I'm no lawyer and all these licenses are more confusing than ever. There are BCL, GPL and others.

As far as I read this the use of Java for software development and desktop / server systems is free. License fees seem to relate to the use of Java in embedded devices and some (which?) parts of Java SE – not the runtime itself.

Is there anything we have to check for license related issues with Oracle when running a JavaEE application in a server environment?

We mainly use JBoss EAP which we licensed to Red Hat (we are Red Hat partner). We also use 3rd party frameworks like iText with separate licenses. But do we need some commercial license for using the Java runtime with our application servers?

Some references:

  • Meanwhile things are much clearer... Red Hat certifies Red Hat Linux + JBoss EAP + Open JDK (in this particular combination)... so we'll stick to this since we've already licensed Red Hat JBoss EAP. With Open JDK 11 we won't have another choice. Commented Sep 6, 2018 at 7:12

1 Answer 1


The short answer is that eventually Oracle may consider any kind of Java usage as "function specific" be it server or desktop-based and therefore not licensed.

The only sane thing is to use the OpenJDK and never use any BCL-licensed JRE/JDK.

See also this closely related answers to Is it legal to bundle Oracles JRE with an open source program?

Short answer: No. The Java (JRE and JDK) binaries provided by Oracle come so many strings attached that they are practically unfit for any usage or redistribution with proprietary or open source-licensed software including GPL-licensed software.

The only sane alternative is to consider the OpenJDK which is using a combo of licenses and is primarily under the GPL 2.0 with Classpath exception which is typically considered suitable for any open source or proprietary usage. See below for some pointers to OpenJDK pre-built binaries or build it yourself...

So as far as using JBoss and Wildfly is concerned, using anything but an OpenJDK is likely to ask for troubles from Oracle.

Which should not be an issue on Red Hat that is involved in the OpenJDK development and uses that Java runtime in their distros and even goes as far ass making a Windows build available.

So in conclusion....

Is there anything we have to check for license related issues with Oracle when running a JavaEE application in a server environment?

The answer is a clear yes: make sure you DO NOT use a pre-built Java runtime or SDK provided by, or downloaded from Oracle and licensed under the Binary Code License.

Instead make sure you use a bona fide OpenJDK and nothing else. Either get it prebuilt from a Linux Distro, Azul, RedHat or else build it yourself from sources.

  • A generally safe approach... but not a specific answer for my question. For example I've come across the special runtime parameter -XX:+UnlockCommercialFeatures which seems to be necessary to enable commercial features of the runtime. The runtime itself and Java as a language in general are licensed via GPL. So they should be safe...? Commented Jan 2, 2017 at 6:54
  • 1
    @DanielBleisteiner What do you mean. The runtime of OracleJDK is definitely not licensed under GPL. The runtime of OpenJDK mostly is. They're two different things. See oracle.com/technetwork/java/javase/terms/license/index.html
    – xji
    Commented Jan 5, 2017 at 21:56
  • 2
    @DanielBleisteiner If you don't know the difference between Oracle JDK and OpenJDK I suggest you Google that first
    – xji
    Commented Jan 6, 2017 at 3:10
  • @DanielBleisteiner The code difference between the Oracle BCL-licensed JDK and the GPL+classpath-licensed OpenJDK are minor but the licenses differences are MAJOR. The first has a license that is practically unfit for anything but personal usage and evaluation. The OpenJDK license allows for usage and bundling with pretty much anything I can think of, be it proprietary or open source software. Commented Jan 6, 2017 at 7:38
  • @DanielBleisteiner in particular: would your JBoss-based application perform anything specific? likely so, then it could be and would likely be considered as a function-specific application under the BCL and therefore an Oracle JRE/JDK would NOT be licensed at all in this case. So this is not a generally "safe" approach I am suggesting here. This is the only proper and legal thing to do if you want to use a free (as in beer) somewhat official Java runtime. Commented Jan 6, 2017 at 8:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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