B4J Question Using OpenJDK+OpenJFX 11 yields compiler error (package javafx.application does not exist)

m4.s

Member
Licensed User
Longtime User
I have uninstalled my prior Java 8 files, and properly installed OpenJDK 11 and then overlay-ed it with OpenJFX (JavaFX 11) as required.

My Java version shows:
openjdk version "11" 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)​

When I compile my main B4J application, which compiled and loaded/ran fine on Java 8, I get this JavaFX error:

B4J Version: 6.51
Parsing code. (0.22s)
Building folders structure. (0.03s)
Compiling code. (0.94s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.01s)
Compiling generated Java code. Error
src\b4j\aF\main.java:7: error: package javafx.application does not exist
public class main extends javafx.application.Application{
^
1 error

javac 11​


I do not know how to resolve this B4J [Editor] compiling issue and am requesting assistance from B4J community members that [hopefully] were able to configure B4J to work with OpenJDK and OpenJFX (any version).

Note: I also downloaded the open source ControlsFX 9.0.0 jars and copied them into the B4J library folder; and then successfully imported/enabled via the B4J Libraries Manager for my application.

Thanks in advance!
 

m4.s

Member
Licensed User
Longtime User
Thanks Erel.

I've since installed Java 10:

java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)​

and my B4J [Editor] compiling works again for me.


But, I want to eventually use the non-opensource version of Java 11 and higher; and IMO no B4J developer should due to its highly restrictive [non-GPL] license:


Important changes in Oracle JDK 11 License

With JDK 11 Oracle has updated the license terms on which we offer the Oracle JDK.
The new Oracle Technology Network License Agreement for Oracle Java SE is substantially different from the licenses under which previous versions of the JDK were offered. Please review the new terms carefully before downloading and using this product.
Oracle also offers this software under the GPL License on jdk.java.net/11


So...my follow-up question is: will B4J support be added in the near future to support OpenJDK 11 + OpenJFX 11?
 
Upvote 0

m4.s

Member
Licensed User
Longtime User
Hi again Erel.

Sorry, as that was indeed a typo; it should have read: "But, I want to eventually use the opensource version of Java 11 and higher..."

So I'll revise my question a bit now:

When will B4J support OpenJDK 11 (http://jdk.java.net/11/) with OpenJFX 11 (https://openjfx.io/)? Presumably in place of adding support for Java [SE] 11 then, yes?​


Thanks as always.
 
Upvote 0

m4.s

Member
Licensed User
Longtime User
Hello Erel,

Just wanted to thank you for implementing OpenJDK + OpenJFX 11 support for B4J so much sooner than I was expecting.

I'm using it with B4J v7.0 right now, and have encountered absolutely no problems. Never going back to Java 8/9/10...

And your B4JPackager11 works like a charm (of course)!
 
Upvote 0
Top