Other B4J v6.80 BETA with support for Java 11

Erel

B4X founder
Staff member
Licensed User
Longtime User
Java 11 is the next long time supported version after Java 8. Oracle, the owners of Java made all kinds of changes to Java license. While it will still be possible to use older versions of Java without a paid license, they are pushing developers to OpenJDK + OpenJFX. These are the open source versions of Java. Note that their license (GPL + classpath exception) permits usage in commercial closed-source projects.

B4J v6.80 adds support for Java 11. The changes required were mostly internal. Previous versions of Java are also supported.

How to run Java 11?

1. Download Java 11 with the required components: http://b4xfiles-4c17.kxcdn.com/jdk-11.0.1.zip
This package includes the following components: OpenJDK 11 and OpenJFX 11.0.1 (SDK + jmods).

2. Unzip the package. You can put it anywhere you like. C:\Java11 is a good place.

3. Choose Tools - Configure Paths in the IDE and choose the new Java.

B4JPackager will not work with Java 11. The good news is that there is a better tool available. It is written in B4J and it can be customized as needed. The tool name is B4JPackager11.

More about B4JPackager11: https://www.b4x.com/android/forum/t...the-simplest-way-to-distribute-ui-apps.99835/

Notes

- A new version of B4J-Bridge was released (v1.42). It is required for Java 11. If you are running Java 11 on the PC then you should also run Java 11 on the remote computer.
- UI runnable jars are not supported in Java 11+.

Download link:

B4J v6.80 BETA: www.b4x.com/b4j/files/beta.exe
 
Last edited:

techknight

Well-Known Member
Licensed User
Longtime User
Will Java 8 continue to be supported? Our powdercoating oven runs a proprietary touch based Atom PC Which is stuck on a 32bit version of windows and my app is B4J of course.

Edit: Oops nevermind, I saw the line where you said previous versions are still supported.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Am I imagining it or can Lambdas now be used in inline code.
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
I know you don't particularly like thank you messages Erel, but in this case I just have to say that after a couple of hours investigating Java11 and jlink in particular, this packager is a wonderful addition. It fits right in with the B4x philosophy of making things easier for your users. Not that I don't want to know what is involved behind the scenes, because I do, but I can take my time to investigate as we have a tool that works 'out of the box'. So Thank You.
 
Last edited:
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
I must be dreaming? C sharp support in B4J ??? I remember it almost started a flamewar when I asked about this years ago. Seems like I was way ahead of my time. Just the victory I needed. That's a shoe in the face for everyone who dared to revolt against that I estimated this long ago. Thank you Lord Erel (The emperor :) ) I am your loyal servant. B4X is indeed powerful.


AAAAAAATHEEEEEEENNNAAAAA.........
 
Last edited by a moderator:
Upvote 0

highflyer

Member
Licensed User
Longtime User
Waiting for debugger to connect...
Program started.
B4JPackager11 Version .90
Include Web Module? false
Running: C:\Users\paolo\Desktop\Java11\B4JPAC~1\Objects\temp\FindDosPath.exe
Running: C:\jdk11\bin\jar
Package name: b4j.example
Running: C:\jdk11\bin\javac
.
module-info.java:8: error: package java.sql is not visible
uses java.sql.Driver;
^
(package java.sql is declared in module java.sql, but module b4j does not read it)
1 error
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Windows doesn't know that JDK11 exists on the system if you follow this tutorial, thats the problem I am running into. (I dont use b4jpackager, I run jars directly). So I was wondering if you could update the tutorial to fix this issue? or is it just better to bundle the runtime into the app?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
@Erel: I'm not planning to adopt JDK11 for now, but from the above comments it seems that if we will deploy five JDK11-based apps on a PC we will have five copies of a JRE11 (eventually, each one "tailored" to the specific app). Will this be the future?
 
Upvote 0

LWGShane

Well-Known Member
Licensed User
Longtime User
@Erel - Are there plans to implement code signing in the B4J Packager?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
@Erel: I'm not planning to adopt JDK11 for now, but from the above comments it seems that if we will deploy five JDK11-based apps on a PC we will have five copies of a JRE11 (eventually, each one "tailored" to the specific app). Will this be the future?
Yes and it is better than relying on the customer having the correct Java version installed. Your app comes with a bundled JRE with the modules required by your app. The installer size is about 30 mb (without the web module). Not small but although not too large.

@Erel - Are there plans to implement code signing in the B4J Packager?
Yes.
 
Upvote 0
Top