I'm new to android developing and maybe my question is strange.

If I want to make commercial apps, libraries, or services for android and use Google Android Studio + Oracle JDK (not OpenJDK) is there any problem? Do I need to buy license from oracle?

3 Answers 3


No, Oracle's JDK is free of use. Android is based on Java Programming language. That's why you need to install Java, so that your app can be compiled and run successfully.


The existing answers here aren't entirely true.

The Oracle Java SE license agreement contains the following term:

The use of Software in systems and solutions that provide dedicated functionality (other than as mentioned above) or designed for use in embedded or function-specific software applications, for example but not limited to: Software embedded in or bundled with industrial control systems, wireless mobile telephones, wireless handheld devices, kiosks, TV/STB, Blu-ray Disc devices, telematics and network control switching equipment, printers and storage management systems, and other related systems are excluded from this definition and not licensed under this Agreement.

This means that, technically, you are not permitted to use the Oracle JDK for development of mobile applications. That said, I don't believe anyone has ever been prosecuted for this and I don't believe it would be possible for them to distinguish which version of Java your development system ran on while you were working on your applications, but it is worth bearing in mind that technically you need a commercial license to use Oracle JDK for mobile development work.


Pretty much the only time you might need to buy a license is if you want to redistribute the JDK itself. For such scenarios, if you are not sure, contact Oracle and ask or get your corporate legal team to look into things.

When just distributing things you build using the JDK (which you're doing), it's free to use.

Your Answer

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

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