B4J Question Java licensing, OpenJDK [solved]

Didier9

Well-Known Member
Licensed User
Longtime User
I was wondering how the new Java licensing will affect users of B4J in a corporate setting. Will B4J have to be licensed independently of the applications developed with it?
Secondly, Oracle has not promised to not require licensing for non commercial users, simply that it would not happen before 2020 (what a relief /s) so it seems like no matter the application the free ride is over or will be soon.
It is particularly disappointing because I am about to complete my first project in B4J as a replacement for old trusty VB 6.0 and not only it went fairly well but I like it and I can see myself using it for all new projects.

Related, I have downloaded the pre built open source binaries of the JDK versions 8 and 11 as I have seen recommended but I have not tried running anything with those. Any pointer to make B4J work with those would be appreciated.
 

Didier9

Well-Known Member
Licensed User
Longtime User
Thank you Erel. So if I have the Oracle JDK installed, I need to remove it before installing OpenJDK.
Sounds simple enough, I will try it.
I won't be sorry to ditch the Oracle product, at work and at home.
I also use Eclipse fairly extensively (for ARM development in C). I need to look into that too.
 
Upvote 0

Didier9

Well-Known Member
Licensed User
Longtime User
No. You don't need to remove anything. There is also nothing to install. Just download the Java 11 package from the installation link and unpack it.

I installed the OpenJDK 11 and after pointing B4J to the javac.exe and compiling, I get this error:
B4X:
B4J Version: 7.30 BETA #1
Java Version: 11
Parsing code.    (0.03s)
Building folders structure.    (0.03s)
Compiling code.    (0.14s)
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
Compiling generated Java code.    Error
error: module not found: javafx.swing
1 error

javac 11.0.2

The program does not do anything fancy, it uses the serial port to send/receive data, decode it and put it on screen. There is no sound or video or database.

It does compile and run fine under the Oracle java sdk.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Did you download openjdk11 from the b4x site or download OpenJDK and JavaFX-SDK from their respective sites?

If it was the latter, B4J expects JavaFX to be contained in the OpenJDK folder - simply create a folder in OpenJDK folder called JavaFX and copy the contents of the JavaFX-SDK folder to it.
 
Upvote 0

Didier9

Well-Known Member
Licensed User
Longtime User
Thank you Daestrum, I am obviously not very good at reading instructions... I had downloaded Open JDK separately while reading about Java, I overlooked the blurb about JavaFX in the B4J installation instructions...

Update: I downloaded the full package linked by Erel and it is working. It is 11.0.1 instead of 11.0.2 as I downloaded from the OpenJDK site but it seems to work just fine. Thank you!
I am separately downloading the JavaFX package and I will try to add it to the 11.0.2 package for completeness.

Update 2: this is working too. I am the proverbial happy camper :)

Hopefully it will keep the corporate IT copyright enforcement police away from me re. Oracle...
 
Last edited:
Upvote 0
Top