B4J Question Benefits of the two versions Java 11.x or Java 8.x

Markos

Active Member
Licensed User
Longtime User
Hi All,

Has anyone did a quickie comparison between which of the two java sdk's is preferred for what purpose functionality or efficiency wise not license wise. It would be most helpful depending on my App capabilities I would hope.
 

Markos

Active Member
Licensed User
Longtime User
Also in general for all B4X products which product works best with which Java SDK type functionality and feature wise. Very broad question feel free to prepare a comparison table lol. But honestly any viewpoint is most welcomed
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
I recommend using OpenJDK 11 (download from: https://www.b4x.com/b4j.html).
No need to create an Oracle account, it is newer, and it is compatible with B4J Packager 11 which is better than Oracle packager tool (wrapped by the old B4J Packager).

There is one advantage to Java 8, which is the support for executable jars. This is especially useful for small utilities.
 
Upvote 0

keirS

Well-Known Member
Licensed User
Longtime User
Java 8 can target 32bit and 64 bit O/S (there is a 32 bit version of Windows 10) Java 11 is 64 bit only. I use both Java 8 and Java 11 (both open JDK). For packaging Java 8 I use Launch 4J and BJ packager 11 for 11. With a bit of fiddling (mainly to do with layout in Java FX) it is possible to have a project that can be built in Java 8 for 32 bit and Java 11 for 64 bit.
 
Upvote 0

Markos

Active Member
Licensed User
Longtime User
Good point about 32 bit computers, though they are become less and less common.

Note that Launch4J doesn't create a standalone package. Java will need to be installed on the user computer.
Great responses Erel & keirS !

Just 4 quick questions..

1) The use of Java 11 applies to b4a and b4i as well?

2) Secondly is there a package for Java 8 or is that the old b4jpacker?

3) An executable Jar can run at command prompt without jave.exe prefix? But needs Java present on that system?

4) An executable Jar runs on linux and Mac as well?
 
Upvote 0

Green1

Member
Licensed User
Longtime User
Hi

I'm getting 403 forbidden when trying to download OpenJDK from the provided link, and having trouble configuring the installation to use JFX when downloading both separately. Can you assist with this please?

Thanks
 
Upvote 0

Markos

Active Member
Licensed User
Longtime User
Hi

I'm getting 403 forbidden when trying to download OpenJDK from the provided link, and having trouble configuring the installation to use JFX when downloading both separately. Can you assist with this please?

Thanks
It is on the b4j page but here is the link below
Java11

If after you download it, unzip it to c:\java11, take care it doesnt create \java11\jdk-11.0.1\jdk-11.0.1, if it does just collapse back the contents to the 1st \jdk-11.0.1 folder.

If you want to go more into the Installation you may have to open a new thread and state explicitly if it's B4J installation or other
 
Upvote 0

Green1

Member
Licensed User
Longtime User
Thanks, but the link isn't working for me as I appear to be forbidden, so it is the folder config for the individual downloads to work together I need.
Sorry if that wasn't clear
 
Upvote 0

Markos

Active Member
Licensed User
Longtime User
Thanks, but the link isn't working for me as I appear to be forbidden, so it is the folder config for the individual downloads to work together I need.
Sorry if that wasn't clear
So you cant download the java sdk? You are behind a firewall that blocks download of ZIP files?
That can be either black listed or perhaps more so a buggy or tainted Browser. Try a different browser Firefox if not already.
You are new to B4J? What have you downloaded so far that you could download for B4J. If all else fails I can always put the JDK on my ftp server and give you that link. Hopefully isnt your IP is blocked but maybe your computer time stamp is off which could happen.

Anyway that's enough for your to respond to if helps get over that download hurdle.
 
Upvote 0

Green1

Member
Licensed User
Longtime User


This is Edge, but same for chrome browsers and Opera. Not sure why. Same for work and home. I guess it's just me as I haven't seen other complaints.
Anyway, I'm up and running now
 
Upvote 0

Green1

Member
Licensed User
Longtime User
Yes, one browser is blocking the link from the B4J page completely, and I must have been copying the zip link to other browsers. Thanks
 
Upvote 0

amykonio

Active Member
Licensed User
Longtime User
Good point about 32 bit computers, though they are become less and less common.
Hi Erel.
Raspian isn't available in 64-bit.
I mention that because there are many questions about raspberry in the forum. I know there are some build of Java sdk 11 in 32-bit but I'm not sure how reliable they are. I personally use JDK 8 for my pi's.

Andreas.
 
Upvote 0

aminoacid

Active Member
Licensed User
Longtime User

Yes... exactly my thoughts! There are also a lot of other boards out there with ARM7 processors (32 bit) which will need Java 8
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…