Confusion about OpenJDK

I am really confused.

Simple (stupid) questions?

  1. Is it permitted to make and sell commercial program using OpenJDK (GPLv2 license)? I want to make and sell an application using Java. I’m not publishing this application as open source. I can’t figure out if this “copyleft” interferes with my ability to make and sell something. I don’t need to understand all the ramifications and concepts, I just want to know if I can make and sell using OpenJDK.

  2. I packaged and released an app on itch.io that makes use of Java SE 9, from Oracle. The Java 9 was downloaded many months ago, and my release was last month. Does the existence of this require paying Oracle a licensing fee? I don’t intend to change or update the jre that was built. Do I need to rebuild this with OpenJDK to avoid the licensing fee?

  3. I’m totally confused as to how to create a dev environment that makes use of both JavaFX and OpenJDK 11. It seems like “the plan” is to write code “once”, then package it at least three times (Windows64, Mac OS, Linux) by making a custom JRE for each OS, using jlink. Fine. But creating the dev environments where this can be accomplished is not obvious to me, especially if using OpenJDK and JavaFX together now that the two have been separated.

How are people doing this on Win64?
How are people doing this on Mac OS?
How are people doing this on Linux?

I’m okay with just using the command line tools and doing steps manually. My programs are NOT complicated, only require maybe two or three modules. I’d really not get into the complexity of building Java implementations, or otherwise making use of tools like Maven, Ant, whatever. Command line javac works fine for my simple applications.

I’m really close to saying F*CKITALL to JavaFX and going back to Swing.


EDIT: am going to take a look at Eclipse’s J9. Also found https://openjfx.io/ and will be taking a look at its documentation tomorrow.

Hello

  1. Yes, OpenJDK is under GPL v2 with classpath exception, similar to LGPL.

  2. You might have to rebuild this with OpenJDK in the future to avoid the licensing fee but it’s currently unnecessary now.

  3. I can’t help you on OpenJFX/JavaFX.

By the way, I advise you to go to adoptopenjdk.net to find prebuild JREs, including some relying on OpenJ9.

Thanks @gouessej!

  1. The way things are going, I may be able to rebuild my app sooner rather than later. Am glad to hear there is some breathing room, though.

  2. In answer to this, I’ve found a tremendous resource, http://openjfx.io

This site has built OpenJFX which can be used with OpenJDK 11.
There is a tutorial on the page called “Getting Started”.
It assumes one has installed OpenJDK 11 from http://jdk.java.net/11/.
Then, it has a guide for installing OpenJFX on Windows, Mac, and Linux.

The guide is well written and includes a sample JavaFX program, plus instructions on how to compile and run the sample code. The commands are slightly different than “normal” modular in that the /lib with JavaFX modules is in its own location, not with the Java 11 modules.

There are also instructions for using jlink, and for use with Eclipse/Netbeans/IntelliJ.

I don’t think there is anything on the last packaging steps, where one does things like set it up for “native install” or the ability to register associated data types. Will be heading back to Oracle’s guides for that info.

So far, I’ve managed to install both OpenJDK 11 and OpenJFX on both Windows and on a Linux/Ubuntu 18.04.1 VirtualBox emulator. I’ve also managed to compile and run my ReferenceNoteKeyboard application in each, with only one (expected) hitch: I haven’t configured sound for the VirtualBox guest, and thus can’t hear the notes being played. But the gui works fine.

Next step: see if the jlink commands work in both OS’s. [EDIT: jlink is working on both. Chances are it will also work on Mac OS, as command line is identical.] (Side project: loading new Eclipse to run with the OpenJDK/OpenJFX system and if it works deleting the Oracle Java 8 & 10 that I am currently using, and, seeing if I can get some sound out of my VirtualBox.)

No, I can’t use VirtualBox for Mac emulation. It seems that having an AMD processor makes this very difficult, and I got banned from the AMD-MAC forum. For “spamming”. No response to request for clarification from the forum manager. I posted 3 times, one an intro and response to response, one asking for the right place to ask a question. OK I know I am “prone to prose”. But spamming? The question I wanted to ask pertained to instructions for editing the boot configuration, their example being ASUS my motherboard being ASROCK, with many discrepancies between the two.