What is Liberica JDK and can we use it with B4X?

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
AlwaysBusy is right. but I want to add that Erel's JDK. Is mainly for development.

Liberica is good when you want to target raspberry pi with an UI.

There are some other JDKs. For example. Graalvm that is focused on microservices and the cloud.

Now days eclipse and Microsoft has their own JDKs. If you know how Erel's JDKs work. Then you could experiment.
 

hatzisn

Well-Known Member
Licensed User
Longtime User
Hello,

I was suggested by a fellow core JAVA developer to use Liberica JDK instead of standard JAVA JDK from Oracle.

Has anyone tried this with B4X. Can we use it instead of the standard JAVA JDK?

Here is the link.

TIA

Liberica JDK is only a good choice if you have a Raspberry Pi.
 

LWGShane

Well-Known Member
Licensed User
Longtime User

aeric

Expert
Licensed User
Longtime User
I think it would work for B4A and B4i but B4J requires javafx folder in a specific structure. Liberica JDK doesn't follow this structure so you still need to copy the javafx + jmods folders into it.

Note that you can use any version of OpenJDK you like. You just need to download the three pieces and put them in the right place:
- OpenJDK
- JavaFX SDK + jmods: https://gluonhq.com/products/javafx/

JavaFX SDK should be in javafx folder.
JavaFX jmods should be in javafx\javafx-jmods folder

I have tested and suggest to download the JDK from the following:
For JDK 17:

OpenJDK 17.0.2 (choose Windows / x64 zip and extracted as jdk-17.0.2 folder under C:\Java or your preferred directory)
Download: https://jdk.java.net/archive/

JavaFX 17.0.2 (extract the SDK to jdk-17.0.2 directory extracted above as javafx folder, jmods into this javafx directory as javafx-jmods)
Download: https://gluonhq.com/products/javafx/

View attachment 139059

View attachment 139058
 

EnriqueGonzalez

Well-Known Member
Licensed User
Longtime User
Liberica JDK doesn't follow this structure so you still need to copy the javafx + jmods folders into it.
you are right but that is for develpment. when installed on client machine, that specific structure is not needed
 

xulihang

Active Member
Licensed User
Longtime User
I think it would work for B4A and B4i but B4J requires javafx folder in a specific structure. Liberica JDK doesn't follow this structure so you still need to copy the javafx + jmods folders into it.
I don't think so. I am using Liberica JDK for compiling B4J apps and it works.
 

Gandalf

Member
Licensed User
Longtime User
I have used Liberica JRE to run B4J jar files (compiled with Oracle Java 8) on old 32 bit computers, on Linux. It displayed some warnings but worked.
 
Top