Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I developed scientific software for use in my own scientific research. I am considering porting it to another language such as Java, and releasing a closed-source, commercial version of it for sale. I have been looking into Java, but I have some questions about the legal issues related to licensing Java for a commercial application, and the people who answer the phone at Oracle tell me that they do not talk to developers.

I have carefully read the JDK license agreement here. But I still have questions. Does anyone reading this have any experience releasing commercial, closed-source, applications running on Java?

If so, can you send me some links to information about the legal issues? My own web searches keep coming up with the same stuff.

My understanding is that I would have to redistribute Java 6 with my application, and that my application would have to check to see if Java is installed in the end user's computer, and then install Java if it is not installed, or if a newer version of Java needs to be installed. Many of these end user computers might be in large organizations which might not have purchased Oracle licenses.

Can my commercial application distribute the Java platform for free in this way without paying a fee to Oracle? Or are there fees or other restrictions involved? Can you please post a link to any information on the web about this?

From what I have read, the only fees seem to be related to the commercial features of Java, which are limited to tools for optomizing large enterprise applications. But I would like to hear from other developers, and to read the information that you might link to on the web in your replies, if you are willing.

Alternatively, I would consider writing my application in C++ or in c#.net instead.

share|improve this question

migrated from stackoverflow.com Jul 1 '11 at 21:56

This question came from our site for professional and enthusiast programmers.

Most Java apps I've seen do not install Java themselves. More importantly though, if you are creating a true commercial application, you'll have many more intellectual properties issues than this. As much as I hate to say this, my recommendation is to discuss this with an intellectual properties attorney. –  Hovercraft Full Of Eels Jul 1 '11 at 21:36
Thank you for everyone's information. I am going to keep this open for a couple more days in case other people want to comment. Also, I am going to continue to think about the things people said, and I may ask additional follow up questions of the people who already commented. –  CodeMed Jul 2 '11 at 6:27
Thank you again for all the answers. I am going to mark this question as competely answered now, and consider the question closed. –  CodeMed Jul 4 '11 at 7:39

4 Answers 4

up vote 2 down vote accepted

You can eliminate some of the problem by using JAWS: http://en.wikipedia.org/wiki/Java_Web_Start. But I'll be interested to see other people's ideas on your question.

Also note that C# and Java both produce bytecode that is more or less easily decompiled. For Java there are compilers, such as gcj and Excelsior JET, that turn your app into machine code.

share|improve this answer
Users without Java would need to install Java to use JAWS, which is what he is concerned about. How would JAWS solve his problem? –  Greg Jul 1 '11 at 21:41
Greg, you're right; it would however solve the problem of the wrong version of an installed JVM, and in fact the way JAWS and JNLP work causes most browsers without Java support to automatically prompt for download of the correct JVM. –  jcomeau_ictx Jul 1 '11 at 21:43
jcomeau_ictx, are you saying that gcj and Excelsior JET would transform my code so that it can run without needing any of the Java tools (such as the JVM) installed in the end user's computer? –  CodeMed Jul 1 '11 at 22:03
@CodeMed, apparently. I haven't tried gcj, only Excelsior, and if your app requires external libraries (like the JMF) you still need to install those on the target system, for the DLLs and possibly registry settings. –  jcomeau_ictx Jul 1 '11 at 22:07
Thank you, jcomeau_ictx. –  CodeMed Jul 1 '11 at 22:22

First, as you said most of Java is free. Certainly the JVM you need to run a simple application and the JDK you need to compile it are (and there are alternatives to the one from Oracle). Other frameworks (servers, third party libraries and more) may or may not be free, read about any of them.

Second, do not worry about "I have to install Java". Just put the version of Java your software needs and assume that your customer will install the flavour that suits them better. Java is mainstream, it is not a strange component that your customers might not know/trust.

Edit: Some groups have issued implementations of the JVM/JDK... Of memory I can only tell of OpenJDK, but there should be a couple more.

share|improve this answer
SJuan76, what are the alternatives to the Oracle JVM/JDK that could be used for this purpose? –  CodeMed Jul 1 '11 at 22:20
@CodeMed: Apache Harmony, IcedTea, SoyLatte, IKVM.NET, IBM J9, Oracle JRockit, MJR, Oracle Labs Maxine, Jikes RVM, Excelsior JET, GCJ, and probably dozens of others. –  Jörg W Mittag Jul 2 '11 at 9:28


Do you need to install a JDK or just the JRE? Before going open source, it wasn't allowed to redistribute the JDK yourself, but you could distribute the JRE to run your program - for instance from CD, or to install this JRE.

If you need a JDK, it is another question, and since the situation changed with SUN going open source, and then with Oracle, buying SUN, I can't tell you something about that.

Myself, I don't need to distribute a JDK and I sofar just distributed Open Source programs.

share|improve this answer
Thank you, user unknown. I do not think I need to distribute the JDK. But I think I would need to distribute the JRE/JVM. I am just starting to learn Java after spending a long time coding in python, which I would not use for a commercial app. –  CodeMed Jul 2 '11 at 6:02

You are allowed to develop and sell closed-source software in Java, without paying royalties.

There's no catch, knock yourself out.

share|improve this answer
I've been writing commercial Java for since the early 2000's and the companies I've bee employed by have sold said applications. Our lawyers were always happy. Distributing the JRE is possible, the JDK not so much. SJuan76 nails that side of things. –  Tim Williscroft Jul 3 '11 at 23:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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