I'm not asking for legal advice; just some rough guidance.

I have a host application in Java that uses the Rhino JS engine to execute JavaScript. That JavaScript can then make calls into other Java libraries, some of which might be licensed under the GPL.

I distribute my hosting app, the JS files as source and the unmodified Java libs. I have released all of the JavaScript as open source.

Am I also required to release my Java hosting apps source?


I think that the answer is yes. If you distribute this "package", you do need to release source code for your Java app framework and your Javascript under a license that is compatible with the GPL. But if you don't distribute the package, then there is no GPL requirement to release your source code.

The AGPL-motivating issue doesn't seem to apply here. That covers the case where someone builds (for example) a website using GPL'ed components, but doesn't distribute the server-side and therefore doesn't have to release the source code. (In your case, you ARE distributing your framework.)

There is a caveat to the above. If the libraries are LGPL or "GPL with Classpath exception" then non open-source code can effectively use the libraries without being "contaminated" by the "viral" GPL release requirements. Check the licenses for the libraries you are actually using.

The bottom line is that you need to understand what the licenses yourself, make your decisions on that basis, and live with the consequences. If you want to distribute binaries / bytecodes without releasing your source code, don't use GPL libraries. Period.


I am not a lawyer but from what I understand if you distribute code or binaries that use anything under the GPL, then yes, you need to open source it.

If you're not distributing it outside of your company, you generally don't have to do anything. So if you provide a hosting service with your Java hosting code but don't actually distribute it to others, then you can keep it private to yourself or your company.

Some people consider it a loophole in the GPL which it why the AGPL was created.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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