B4J Question B4JPackager for Oracle Java

Didier99

Member
I have not been able to use the B4JPackager11 because the Java 11 JDK's serial port code is broken. While I have on occasion been able to get the serial port stuff work with OpenJDK, it has not been reliable so since my company licenses Oracle Java anyways, I have been using that.
I have also been using Launch4J to package my .jar files into .exe's.
For some reason, I am now having issues with the .exe from Launch4J not running because of "java version mismatch" (not sure where that came from but I have multiple computers affected) so I would like to try the B4JPackager again, but it only supports Java 11 and I have not been able to find a version of Oracle Java that works with it.
Any suggestion appreciated, TIA.
 

aeric

Expert
Licensed User
Longtime User
You should use the versions of JDK listed on B4J download page.
 
Upvote 0

Didier99

Member
You should use the versions of JDK listed on B4J download page.
Which is what I am doing (see below)

1733154348300.png


but the B4JPackager code looks for "11" in the version:

1733154390662.png


and that fails:

1733154317253.png
.
 

Attachments

  • 1733154194682.png
    1733154194682.png
    65.3 KB · Views: 38
Upvote 0

Chris2

Active Member
Licensed User
Longtime User
because the Java 11 JDK's serial port code is broken
Really?
I've been successfully using B4J with the jSerial library using OpenJDK 11 & OpenJDK 17 for a number of years. What makes you say it's broken?

I would like to try the B4JPackager again, but it only supports Java 11
I'm pretty sure the IDE internal packager supports OpenJDK 14 as well, so if the serial port issue you've come across in JDK 11 is fixed by 14, then you could use that.
(incidentally, I've been using the internal packager with OpenJDK 17 for a while without any problems too, although I appreciate that it is not officially supported).
 
Last edited:
Upvote 0

aeric

Expert
Licensed User
Longtime User
Your screen is showing B4JPackager version 1.02
I think you are using older version of B4J.
Use latest version of B4J version 10.00
The latest version of B4JPackager11 is 1.40 and support JDK14.
 
Upvote 0
Top