7

I’m using Maven to package my JavaFX project for distribution. Since JavaFX is licensed under LGPL, I need to allow users of my project to replace its DLLs by newer or compatible versions. But I don’t understand where the DLLs are placed in the resulting folder or how a user of my package can replace the DLLs. I use the terminal commands mvn clean compile and mvn package which creates a folder of jars at target/app but no DLLs are found, just library jars (program executes fine). I’ve added the DLL’s to maven’s local repo using mvn install:install-file -Dfile=C:\jacob-1.18-M2-x86.dll -DgroupId=jacob -DartifactId=jacob-dll -Dversion=4.2 -Dpackaging=dll -DgeneratePom=true

Why are no DLLs found, and how can users freely switch them for new versions, which is required for my program to fulfill the terms of LGPL?

Mathomatic
  • 249
  • 1
  • 2
  • 6
  • 4
    LGPL has nothing to say about the location of your DLL's. – Robert Harvey Sep 16 '16 at 23:08
  • 1
    The answer here says "LGPL's basic requirement is to separate the LGPL-licensed library and your own product well enough ... use the LGPL code as a shared library (so the users would just copy their binary of the library over the one you ship)". But I don't understand WHERE the DLLs even are in my target/app folder, only jars exist. How can this satisfy the need to be "separated well enough"? How can a user replace a DLL that I can't even find? Please see my confusion, thanks. –  Sep 17 '16 at 00:35
  • 4
    JavaFX is not LGPL. It is GPL "with classpath exception". You should read what the classpath exception language says to see how you should comply in your case. – Brandin Sep 17 '16 at 14:28

1 Answers1

1

First JavaFX is not using the LGPL but partly under:

The net effects is that JavaFX as a whole is not open source. Instead this is using a proprietary "trialware" license (the Oracle BCL) with some UI parts under the GPL + classpath.

Per the FAQ:

At this time, the JavaFX UI Controls source code has been contributed to the OpenJFX open source project; other JavaFX components are expected to follow in multiple phases. The code is available under the GPL v2 with Classpath Exception license, similar to other projects in OpenJDK. The Oracle JavaFX runtime and SDK implementations will continue to be released under the Oracle Binary Code License for the Java SE Platform.

So what can you do?

  • if you can build everything in OpenJFX from sources and everything has been released by Oracle, you could build this and use these builds. I have not enough understanding of the JavaFX code nor what has been really released under OpenJFX to draw any conclusion. If everything is available under the GPL+classpath, you can read this answer to understand what would be your obligations under this license.
  • otherwise, you cannot use much of JavaFX beyond the limited rights granted by the Oracle BCL, and you likely will need to buy a commercial license from Oracle.

Additional answer elements:

It looks like after all there is a GPL+classpath version of the JavaFX runtime that has landed in mercurial. So what you could do is redistribute an OpenJDK and build yourself this JavaFX from sources as well as the libraries. If you rely on the pre-built binaries provided by Oracle as part of the BCL-licensed Java runtime, you are subject to the vagueness of the BCL and the fact this is not licensed for "function specific" usage.

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: ....

So if you opt for the BCL you will likely subject yourself to this kind of audit as Oracle can consider as function specific whatever it wants... And the word on the street and that it surely uses and abuses of this.

See this answer and this answer and this answer related to the BCL and Java and why it cannot be used for redistribution with free and open source software as well as commercially licensed software, unless you either get a truly open OpenJDK (eventually building it yourself) or you buy a commercial license from Oracle.

Philippe Ombredanne
  • 14,441
  • 2
  • 32
  • 87
  • @Phillipe, can you please clarify... are you saying that I cannot use JavaFX to create commercial applications? I'm not trying to alter JavaFX's source code but simply use it to create JavaFX apps that I can sell to customers. The answer here says there is no difference between Java and JavaFX license now. – Mathomatic Jan 08 '17 at 19:53
  • @Mathomatic I am effectively saying that you cannot use JavaFX in a commercial application unless you acquire a commercial license from Oracle as in the vast majority of cases the Oracle BCL does not license JavaFX for a commercial usage (and that to the best of my knowledge there is no free, libre or open source JavFX runtime available anywhere). – Philippe Ombredanne Jan 09 '17 at 13:48
  • @Phillipe, where do you get your information? The post here says you do not have to release source code. The post here says JavaFX and Java are licensed under the exact same license. This post says there is no special license needed at all. How much does a commercial license cost? I've developed a large app with JavaFX and now feel completely stuck :( Please clarify – Mathomatic Jan 09 '17 at 15:05
  • This post is from JavaFX developers showing all of the code that is open source. Note that it includes "javafx-common", among may other projects. You are the only person I've heard say that I can't use JavaFX freely for commercial use. Finally, here is a post from reputable poster "jewelsea" commenting about the open source trend of JavaFX. What are your sources? Thanks. – Mathomatic Jan 09 '17 at 15:12
  • @Phillipe, I believe you have mistaken Oracle's limitations imposed on their "COMMERCIAL FEATURES" defined here with applying to the entire JavaFX codebase, which I find not to be true. You can see our full discussion of this here. I'd love your feedback on this confusion, are you mistaken? Thanks Phillipe. – Mathomatic Jan 09 '17 at 20:21
  • Let me update my answer with references ... I stand by and will explain in more details my opinion that there are practically no commercial usage possible of code that uses the Oracle BCL including the JavaFX runtime unless you buy a commercial license. The use cases are very narrow and unless you get a strong legal advice you expose yourself to audits from Oracle. – Philippe Ombredanne Jan 10 '17 at 12:44
  • Unless there is effectively an open source runtime for JavaFX... in which case you would have to build this yourself. – Philippe Ombredanne Jan 10 '17 at 12:51
  • @Phillipe, I don't see any updated references in your answer. The JavaFX FAQ clearly states JavaFX is available under the same license and business model as Java SE. This includes the ability for third party developers to distribute the runtime librairies with their application(s), subject to the terms and conditions of the license. This license is of course BCL found here which restricts use of the "COMMERCIAL FEATURES" not commercial use. I'm very doubtful of the information you posted as I don't see any credible – Mathomatic Jan 10 '17 at 19:07
  • sources to back up your claims of no commercial usage possible of code that uses the Oracle BCL including the JavaFX runtime unless you buy a commercial license. I respectively request you provide one and direct me to it. Where does it say I must buy a commercial license in the BCL in order to distribute the runtime? It sounds like you're misquoting this: – Mathomatic Jan 10 '17 at 19:08
  • A. COMMERCIAL FEATURES. You may not use the Commercial Features for running Programs, Java applets or applications in your internal business operations or for any commercial or production purpose, or for any purpose other than as set forth in Sections B, C, D and E of these Supplemental Terms. If You want to use the Commercial Features for any purpose other than as permitted in this Agreement, You must obtain a separate license from Oracle. – Mathomatic Jan 10 '17 at 19:10
  • Here's an official bug report which clarifies the confusion, and seems to contradict exactly what you're suggesting Philippe. See here – Mathomatic Jan 10 '17 at 19:31
  • I quote Nicolas Lorain from the link above: you should be in a position to distribute the JavaFX Runtime with your application(s) by the time you release them to market ... you can distribute the JavaFX Runtime libraries with your application(s) in the same way it has been possible to do it with the JRE for many years. Notice how differently (and free) this sounds as compared to what you're saying. I'm all ears. – Mathomatic Jan 10 '17 at 19:55
  • 1
    I updated my answer. Whatever comments were made 6 years ago on tickets by developers has not much value. What matters is the license and what Oracle makes of it these days. If you still need convincing, you should get legal advice ;) – Philippe Ombredanne Jan 11 '17 at 15:00
  • 1
    Thanks Phillipe, your update was packed with information. It appears that using OpenJDK (GPL+Classpath exception) seems to be my only option if I want to (1) Avoid an audit and (2) Not pay for a commercial license. I'm left with a question though, I'm confused about your comment: what you could do is redistribute an OpenJDK and build yourself this JavaFX from sources as well as the libraries. What does "build yourself this JavaFX" mean? You've mentioned "building" a few times, what does that entail? Is it a very large, long process or is it a simple IDE menu selection? – Mathomatic Jan 11 '17 at 19:39
  • Or somewhere in between? I'm assuming I take whichever OpenJDK components are available under GPL+CP Exception, and then hopefully be able to simply swap my current JDK (Oracle Binary) with OpenJDK, and build like I normally would? The "build" I'm talking about is the minute-long build process my IDE performs, is that what you mean? Currently my JavaFX code only uses public API java.*, javax.* and javafx.*, not com.sun.*. Is it that simple of a switchover to OpenJDK - assuming all necessary components are available? Please comment :) A lawyer is in my near future, no doubt. :) – Mathomatic Jan 11 '17 at 19:44
  • 1
    NOTE: One page 3 of the comments of this audit article you posted above, someone says you may want to learn that Red Hat has quite recently (coincidence?) started providing OpenJDK binaries for Windows: https://developers.redhat.com/products/openjdk/overview/ You can of course also build them yourself . Does this mean I don't even need to "build" JavaFX myself like you mentioned? I'm treading in murky territory, please clarify! – Mathomatic Jan 11 '17 at 20:52
  • 1
    It may be the case or not. You will have to research. If you find a bona fide build from the open source code then that's great for you. Azul and RedHat may provide it, or may they only build the OpenJDK and ignore JavaFX. TBD. Make sure in all case that you safe keep the corresponding source code for any of this pre-built binaries. – Philippe Ombredanne Jan 11 '17 at 21:48
  • I cannot help you on building. This may be a non-trivial endeavour and it converts the source code in compiled binaries. – Philippe Ombredanne Jan 11 '17 at 21:49